zhangshenghang commented on code in PR #10093:
URL: https://github.com/apache/seatunnel/pull/10093#discussion_r2572762734


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/utils/CatalogUtils.java:
##########
@@ -353,4 +383,32 @@ public static CatalogTable getCatalogTable(Connection 
connection, String sqlQuer
             return getCatalogTable(resultSetMetaData, sqlQuery);
         }
     }
+
+    private static PrimaryKey extractPrimaryKey(
+            Connection connection, ResultSetMetaData resultSetMetaData, String 
sqlQuery) {
+        try {
+            String tableName = resultSetMetaData.getTableName(1);

Review Comment:
   If we only take the first one, an explanation should be added in the 
document: The primary key inferred based on the query is inherited from the 
underlying table where the first column is located, and its strictness for the 
join result set is not guaranteed.
   



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