Samyak2 commented on code in PR #2124:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2124#discussion_r2669623072
##########
tests/sqlparser_common.rs:
##########
@@ -17972,3 +17972,126 @@ fn parse_select_parenthesized_wildcard() {
assert_eq!(select2.projection.len(), 1);
assert!(matches!(select2.projection[0], SelectItem::Wildcard(_)));
}
+
+// https://docs.snowflake.com/en/user-guide/querying-semistructured
+#[test]
+fn parse_semi_structured_data_traversal() {
+ let dialects = TestedDialects::new(vec![
+ Box::new(GenericDialect {}),
+ Box::new(SnowflakeDialect {}),
+ ]);
Review Comment:
We actually do have special handling for `SnowflakeDialect` and
`GenericDialect`:
https://github.com/apache/datafusion-sqlparser-rs/blob/ce74e7fe217ac5d2cb5392237a03c7d252a3ea6a/src/parser/mod.rs#L3814
(this is in main currently, not a change in this PR)
From what I know, only Snowflake and Databricks support this syntax. So I
can expand the test to include Databricks as well. But I don't think it would
make sense to run this test on dialects that don't support this syntax. What do
you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]