hqbhoho commented on code in PR #8188:
URL: https://github.com/apache/gravitino/pull/8188#discussion_r2302715831


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/hive/HiveMetadataAdapter.java:
##########
@@ -249,4 +251,14 @@ public ConnectorTableMetadata 
getTableMetadata(GravitinoTable gravitinoTable) {
         properties,
         Optional.ofNullable(gravitinoTable.getComment()));
   }
+
+  /**
+   * Get the column handle name that will generate row IDs for the merge 
operation.
+   *
+   * @return the column handle name for row IDs
+   */
+  @Override
+  public String getMergeRowIdColumnHandleName() {
+    return MERGE_ROW_ID;

Review Comment:
   Retrieve it from the internal connector is diffcult because it is generated 
and not exist in table schema. In origin connector like jdbc define like this ,
   ```
    @Override
       public ColumnHandle getMergeRowIdColumnHandle(ConnectorSession session, 
ConnectorTableHandle tableHandle)
       {
           verify(!isTableHandleForProcedure(tableHandle), "Not a table 
reference: %s", tableHandle);
           // The column is used for row-level merge, which is not supported, 
but it's required during analysis anyway.
           return new JdbcColumnHandle(
                   MERGE_ROW_ID,
                   new JdbcTypeHandle(Types.BIGINT, Optional.of("bigint"), 
Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()),
                   BIGINT);
       }
   ```
   Currently, I use the column name is same with origin connector. 
   ​I'm not sure if having two different names (GrivitinoColumn/internal 
connector column handle) for the same column would cause problems . I will 
check later.



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

Reply via email to