ajantha-bhat commented on code in PR #10111:
URL: https://github.com/apache/iceberg/pull/10111#discussion_r1558665711


##########
core/src/main/java/org/apache/iceberg/jdbc/JdbcUtil.java:
##########
@@ -54,7 +54,29 @@ enum SchemaVersion {
   static final String TABLE_RECORD_TYPE = "TABLE";
   static final String VIEW_RECORD_TYPE = "VIEW";
 
-  private static final String V1_DO_COMMIT_SQL =
+  private static final String V1_DO_COMMIT_TABLE_SQL =
+      "UPDATE "
+          + CATALOG_TABLE_VIEW_NAME
+          + " SET "
+          + JdbcTableOperations.METADATA_LOCATION_PROP
+          + " = ? , "
+          + JdbcTableOperations.PREVIOUS_METADATA_LOCATION_PROP
+          + " = ?"
+          + " WHERE "
+          + CATALOG_NAME
+          + " = ? AND "
+          + TABLE_NAMESPACE
+          + " = ? AND "
+          + TABLE_NAME
+          + " = ? AND "
+          + JdbcTableOperations.METADATA_LOCATION_PROP
+          + " = ? AND ("
+          + RECORD_TYPE
+          + " = ?"

Review Comment:
   Should we hardcode the record type to TABLE since it is only called for 
table?
   Similar comment for the `V1_DO_COMMIT_VIEW_SQL`.
   
   or may be we just have to add "OR RECORD_TYPE IS NULL" to previous 
`V1_DO_COMMIT_SQL` without new changes. 



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