melin commented on code in PR #41113:
URL: https://github.com/apache/spark/pull/41113#discussion_r1191356199


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala:
##########
@@ -2195,6 +2195,17 @@ abstract class DDLSuite extends QueryTest with 
DDLSuiteBase {
         "operation" -> "generated columns")
     )
   }
+
+  test("SPARK-43400: Add Primary Key syntax support") {
+    val catalog = spark.sessionState.catalog
+    sql("CREATE TABLE s(a INT, b INT, PRIMARY KEY(a)) USING parquet")
+    var source = catalog.getTableMetadata(TableIdentifier("s"))
+    assert(source.provider == Some("parquet"))
+
+    sql("CREATE TABLE t(a INT PRIMARY KEY, b INT) USING orc")

Review Comment:
   Just for the convenience of apache paimon & hudi defining primary keys, 
there is a standard syntax.



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