-
Notifications
You must be signed in to change notification settings - Fork 573
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
Support for DuckDB Union datatype #1322
Conversation
Pull Request Test Coverage Report for Build 9651403373Details
💛 - Coveralls |
src/parser/mod.rs
Outdated
|
||
self.expect_token(&Token::LParen)?; | ||
|
||
let fields = self.parse_comma_separated0(|p| { |
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.
Zero field unions are invalid on DuckDB and don't even parse. Should we error here using parse_comma_separated
or let downstream users handle it?
https://shell.duckdb.org/#queries=v0,create-table-tbl1-(u-union()-)~
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.
I think it is fine to return error here.
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.
Done
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.
👍
Pull Request Test Coverage Report for Build 9664186307Details
💛 - Coveralls |
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.
LGTM! cc @alamb
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.
e.g.
CREATE TABLE tbl1 (u UNION(num INTEGER, str VARCHAR));
https://duckdb.org/docs/sql/data_types/union.html