healchow commented on code in PR #7078: URL: https://github.com/apache/inlong/pull/7078#discussion_r1058012354
########## inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java: ########## @@ -532,6 +515,20 @@ protected void attemptFlush() throws IOException { } } + /** + * Output metrics with estimate for pg or other type jdbc connectors. + */ + private void outputMetrics(String tableIdentifier, Long rowSize, Long dataSize) { + String[] fieldArray = tableIdentifier.split("\\."); + if (fieldArray.length == 3) { + sinkMetricData.outputMetricsWithEstimate(fieldArray[0], fieldArray[1], fieldArray[2], + false, rowSize, dataSize); + } else if (fieldArray.length == 2) { + sinkMetricData.outputMetricsWithEstimate(fieldArray[0], null, fieldArray[1], + false, rowSize, dataSize); + } Review Comment: What are the forms of the string before cutting? Can you give some examples? In addition, if the array length is neither 2 nor 3, should you print logs to record data information? -- 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: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org