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


##########
tests/sqlparser_hive.rs:
##########
@@ -226,6 +227,28 @@ fn create_table_with_clustered_by() {
     );
 }
 
+#[test]
+fn display_create_table_with_skewed_by() {

Review Comment:
   ```suggestion
   fn create_table_with_skewed_by() {
   ```



##########
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:
   can we simplify the test to use the format here for example?
   
https://github.com/wenxiaojie1/datafusion-sqlparser-rs/blob/30b2a5a686135af090cf7e757070143f36cdff84/tests/sqlparser_hive.rs#L122-L125



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