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 the ARRAY type of Snowflake #699
Conversation
Pull Request Test Coverage Report for Build 3389576674
💛 - 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.
Thank you for the contribution @yuval-illumex
src/parser.rs
Outdated
Ok(DataType::Array(Box::new(DataType::Custom( | ||
ObjectName(vec!["VARAINT".into()]), |
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 would prefer if this didn't add VARAINT into the parse tree when it wasn't in the original syntax. Can we model this like DataType::Array(None)
perhaps?
@alamb I change the data type to be Thank you! |
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.
Looks good to me -- thanks @yuval-illumex
According snowflake documentation, There is an ARRAY type.
Behind the scenes it contains the
VARIANT
Data type, but the syntax is different. Snowflake don't supportVARIANT[]
.The query that I want to support is:
SELECT CAST (a as array)
I started with creating a new data type called
SnowflakeArray
, But I think it's better to use the existingARRAY
data type (which created for the HIVE dialect)