Skip to content

incompatible custom types block#60

Merged
tomas-villagesql merged 4 commits intomainfrom
tomas/incompatible-custom-type-cast
Feb 26, 2026
Merged

incompatible custom types block#60
tomas-villagesql merged 4 commits intomainfrom
tomas/incompatible-custom-type-cast

Conversation

@tomas-villagesql
Copy link
Copy Markdown
Member

No description provided.

@tomas-villagesql tomas-villagesql force-pushed the tomas/incompatible-custom-type-cast branch from ba9d5e4 to 6fc16cd Compare February 25, 2026 18:55
CREATE TABLE t_mixed (id INT, complex_val COMPLEX, complex2_val COMPLEX2, int_val INT);
INSERT INTO t_mixed VALUES (1, '(1.0,1.0)', '(2.0,2.0)', 100);
UPDATE t_mixed SET complex2_val = complex_val WHERE id = 1;
ERROR HY000: Cannot implicitly cast from vsql_complex.COMPLEX to vsql_complex.COMPLEX2 for column 'complex2_val' at row 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should probably be for tvector, since this should be failing even before this change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added vector test

void TypeContext::resolve_cached_values() {
// Build qualified_name_ once: "ext.type" or "ext.type(v1,v2,...)"
qualified_name_ = descriptor_->qualified_base_name();
if (!key_.parameters().empty()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't match what we need for SHOW CREATE TABLE (which is sitting in a branch of mine waiting to rebase on Mike's changes). In particular, we support TYPE(N) and TYPE('k1=v1,k2=v2,...').

I am fine if you want this as a placeholder for now, but I ask you put a TODO here so that I remember to update it when I make my next changes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@tomas-villagesql tomas-villagesql merged commit b79fb2f into main Feb 26, 2026
9 checks passed
@tomas-villagesql tomas-villagesql deleted the tomas/incompatible-custom-type-cast branch February 26, 2026 05:11
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants