LucaCappelletti94 commented on code in PR #2502:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2502#discussion_r4093679405
##########
tests/sqlparser_snowflake.rs:
##########
@@ -44,6 +44,19 @@ fn test_snowflake_create_table() {
}
}
+#[test]
+fn parse_order_by_all() {
+ let query = snowflake()
+ .verified_query("SELECT value + 1 AS computed FROM source ORDER BY ALL
DESC NULLS FIRST");
+ assert_eq!(
+ query.order_by.expect("ORDER BY expected").kind,
+ OrderByKind::All(OrderByOptions {
+ sort: Some(OrderBySort::Desc),
+ nulls_first: Some(true),
+ })
+ );
+}
+
Review Comment:
You could drop this test. `parse_select_order_by_all` in
`tests/sqlparser_common.rs` runs every dialect where `supports_order_by_all()`
holds, so Snowflake now gets the same `ORDER BY ALL DESC NULLS FIRST` case plus
the other eight option combinations.
```suggestion
```
--
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]