viirya commented on code in PR #50631: URL: https://github.com/apache/spark/pull/50631#discussion_r2063059154
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/constraints.scala: ########## @@ -18,11 +18,17 @@ package org.apache.spark.sql.catalyst.expressions import java.util.UUID +import org.apache.spark.SparkUnsupportedOperationException import org.apache.spark.sql.catalyst.parser.ParseException import org.apache.spark.sql.catalyst.trees.CurrentOrigin -import org.apache.spark.sql.types.{DataType, StringType} +import org.apache.spark.sql.catalyst.util.V2ExpressionBuilder +import org.apache.spark.sql.connector.catalog.constraints.Constraint +import org.apache.spark.sql.connector.expressions.FieldReference +import org.apache.spark.sql.types.DataType -trait TableConstraint { +trait TableConstraint extends Expression with Unevaluable { + // Convert to a data source v2 constraint + def toV2Constraint(isCreateTable: Boolean): Constraint Review Comment: For an API doc, could you clarify what `isCreateTable` is used for? Seems it is not even used in this PR. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org