cloud-fan commented on code in PR #50137: URL: https://github.com/apache/spark/pull/50137#discussion_r2005732847
########## sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableCatalog.java: ########## @@ -230,6 +235,23 @@ default Table createTable( return createTable(ident, CatalogV2Util.v2ColumnsToStructType(columns), partitions, properties); } + /** + * Create a table in the catalog. + * + * @param tableInfo Information about the table. + * @return metadata for the new table. This can be null if getting the metadata for the new table + * is expensive. Spark will call {@link #loadTable(Identifier)} if needed (e.g. CTAS). + * + * @throws TableAlreadyExistsException If a table or view already exists for the identifier + * @throws UnsupportedOperationException If a requested partition transform is not supported + * @throws NoSuchNamespaceException If the identifier namespace does not exist (optional) + */ + default Table createTable(TableInfo tableInfo) Review Comment: I prefer to put `Identifier` as a parameter here instead of in `TableInfo`. This is to be consistent with most of the functions in this interface: `dropTable`, `alterTable`, `loadTable`, etc. which all have `Identifier` as its first parameter. -- 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