-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DuckDB struct test and row as alias #12841
Conversation
Signed-off-by: jayzhan211 <[email protected]>
Signed-off-by: jayzhan211 <[email protected]>
wasmtest Ci failure has been fixed in #12844 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍 -- thank you @jayzhan211
# Test row alias | ||
|
||
query ? | ||
select row('a', 'b'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW there is pretty sweet struct literal syntax like { c1: 'a', c2: 'b'}
as well
> select { c1: 'a', c2: 'b'};
+---------------------------------------------------------+
| named_struct(Utf8("c1"),Utf8("a"),Utf8("c2"),Utf8("b")) |
+---------------------------------------------------------+
| {c1: a, c2: b} |
+---------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.002 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In DuckDB, they don't have column name. Stored like a tuple.
D select row('red', 1);
┌──────────────────────────┐
│ main.row('red', 1) │
│ struct(varchar, integer) │
├──────────────────────────┤
│ (red, 1) │
└──────────────────────────┘
Thanks @alamb |
Which issue does this PR close?
Closes #.
Rationale for this change
Add support for DuckDB-like syntax and functions to facilitate testing
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?