LuciferYang commented on code in PR #41113:
URL: https://github.com/apache/spark/pull/41113#discussion_r1191135180
##########
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:
For File table like parquet, how to ensure the primary key is unique and not
null?
Will it support combined primary keys?
Will there be a design doc to encourage more people to participate in the
discussion before coding?
--
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]