aokolnychyi commented on code in PR #50519: URL: https://github.com/apache/spark/pull/50519#discussion_r2037801684
########## sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableInfo.java: ########## @@ -77,8 +83,22 @@ public Builder withPartitions(Transform[] partitions) { return this; } + public Builder withConstraints(Constraint[] constraints) { + this.constraints = constraints; + return this; + } + public TableInfo build() { checkNotNull(columns, "columns should not be null"); + if (properties == null) { Review Comment: What did we pass to connectors before we added `TableInfo` for properties and partitions? Nulls or empty map/array? We should be consistent. If we need to pass empty map/array, can we move the defaults to the variable definitions? ``` private Map<String, String> properties = Maps.newHashMap(); private Transform[] partitions = new Transform[0]; private Constraint[] constraints = new Constraint[0]; ``` -- 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