laserninja commented on code in PR #10757:
URL: https://github.com/apache/gravitino/pull/10757#discussion_r3238656220
##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoMetadata.java:
##########
@@ -230,12 +230,19 @@ public ConnectorOutputTableHandle beginCreateTable(
ConnectorTableMetadata tableMetadata,
Optional<ConnectorTableLayout> layout,
RetryMode retryMode,
- boolean noExistingData) {
- // First, create the table in the Gravitino catalog
+ boolean replace) {
+ SchemaTableName tableName = tableMetadata.getTable();
+
+ // CREATE OR REPLACE TABLE AS SELECT: drop the existing table first if
present.
+ if (replace
+ && catalogConnectorMetadata.tableExists(
+ tableName.getSchemaName(), tableName.getTableName())) {
+ catalogConnectorMetadata.dropTable(tableName);
Review Comment:
added an inline comment in GravitinoMetadata#beginCreateTable explaining the
UUID cache root cause, and updated catalog-iceberg.md, catalog-mysql.md,
catalog-postgresql.md, and sql-support.md to reflect that CTAS is now supported
while CREATE OR REPLACE TABLE AS SELECT is not.
--
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]