gengliangwang commented on code in PR #54357: URL: https://github.com/apache/spark/pull/54357#discussion_r2824805149
########## sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/constraints/Unique.java: ########## @@ -28,6 +28,15 @@ * <p> * A UNIQUE constraint specifies one or more columns as unique columns. Such constraint is satisfied * if and only if no two rows in a table have the same non-null values in the unique columns. + * Unlike PRIMARY KEY, UNIQUE allows nullable columns. + * <p> + * NULL values are treated as distinct from each other (NULLS DISTINCT semantics). Two rows Review Comment: We don’t need to define the suggested behavior in Spark itself. The behavior can be left to the connector implementations. -- 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]
