iffyio commented on code in PR #2395:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2395#discussion_r3841330128


##########
tests/sqlparser_hive.rs:
##########
@@ -226,6 +227,28 @@ fn create_table_with_clustered_by() {
     );
 }
 
+#[test]
+fn display_create_table_with_skewed_by() {
+    let column = |name| ColumnDef {
+        name: Ident::new(name),
+        data_type: DataType::String(None),
+        options: vec![],
+    };
+    let stmt = 
CreateTableBuilder::new(ObjectName::from(vec![Ident::new("test")]))
+        .columns(vec![column("id")])
+        .hive_distribution(HiveDistributionStyle::SKEWED {
+            columns: vec![column("id")],
+            on: vec![column("id")],
+            stored_as_directories: true,
+        })
+        .build();
+
+    assert_eq!(
+        stmt.to_string(),
+        "CREATE TABLE test (id STRING) SKEWED BY (id STRING) ON (id STRING) 
STORED AS DIRECTORIES"
+    );

Review Comment:
   not sure I follow, if the parser doesn't accept the syntax then sounds like 
something more fundamental is wrong if the test was valid?



-- 
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]

Reply via email to