morningman commented on code in PR #20765:
URL: https://github.com/apache/doris/pull/20765#discussion_r1228208547


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java:
##########
@@ -768,6 +774,13 @@ private DataSink createDataSink() throws AnalysisException 
{
                     table.getLineDelimiter(),
                     brokerDesc);
             dataPartition = dataSink.getOutputPartition();
+        } else if (targetTable instanceof JdbcTable) {

Review Comment:
   add comment



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java:
##########
@@ -717,6 +721,8 @@ public void prepareExpressions() throws UserException {
             }
             if (exprByName.containsKey(col.getName())) {
                 resultExprByName.add(Pair.of(col.getName(), 
exprByName.get(col.getName())));
+            } else if 
(targetTable.getType().equals(TableIf.TableType.JDBC_EXTERNAL_TABLE)) {

Review Comment:
   Add comment



##########
fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java:
##########
@@ -387,13 +391,23 @@ protected ResultSet getColumns(DatabaseMetaData 
databaseMetaData, String catalog
         return databaseMetaData.getColumns(catalogName, schemaName, tableName, 
null);
     }
 
+    protected List<String> getPrimaryKeys(String dbName, String tableName) {
+        List<String> primaryKeys = Lists.newArrayList();
+        List<JdbcFieldSchema> columns = getJdbcColumnsInfo(dbName, tableName);

Review Comment:
   The logic in this method does not match the name of this method.
   Better change to a proper name, or add comment to explain why



##########
fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java:
##########
@@ -387,13 +391,23 @@ protected ResultSet getColumns(DatabaseMetaData 
databaseMetaData, String catalog
         return databaseMetaData.getColumns(catalogName, schemaName, tableName, 
null);
     }
 
+    protected List<String> getPrimaryKeys(String dbName, String tableName) {
+        List<String> primaryKeys = Lists.newArrayList();
+        List<JdbcFieldSchema> columns = getJdbcColumnsInfo(dbName, tableName);

Review Comment:
   Looks like all columns are primary key columns?



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