lisancao commented on code in PR #59683:
URL: https://github.com/apache/spark/pull/59683#discussion_r4355580715


##########
docs/sql-v2-data-sources.md:
##########
@@ -116,10 +117,16 @@ categories of metadata operations through Spark SQL.
 |--------|-------------|
 | `listTables(namespace)` | List tables in a namespace |
 | `loadTable(ident)` | Load a table by identifier |
-| `createTable(ident, columns, partitions, properties)` | Create a new table |
+| `createTable(ident, tableInfo)` | Create a new table from a 
[`TableInfo`](api/java/org/apache/spark/sql/connector/catalog/TableInfo.html) 
carrying columns, partitioning, properties, and constraints |
 | `alterTable(ident, changes...)` | Alter a table's schema, properties, or 
constraints |
 | `dropTable(ident)` | Drop a table |
 
+`createTable(ident, tableInfo)` is the form Spark calls (since 4.1.0). The 
older overloads
+`createTable(ident, columns, partitions, properties)` and `createTable(ident, 
schema, partitions, properties)`
+are deprecated (since 4.1.0 and 3.4.0 respectively); their default 
implementations delegate down the
+chain, so a catalog that overrides only the `TableInfo` form serves every 
`CREATE TABLE`,
+`REPLACE TABLE`, and CTAS path.

Review Comment:
   Right, that sentence only held for a plain `TableCatalog`. In 658749d the 
paragraph says a catalog that implements only `TableCatalog` serves those paths 
with the `TableInfo` form, and that a `StagingTableCatalog` is reached through 
`stageCreate`, `stageReplace` and `stageCreateOrReplace` instead, whose 
`TableInfo` overloads delegate to the deprecated forms and throw unless 
overridden. The StagingTableCatalog section now names the three methods as well.



-- 
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]

Reply via email to