Jibing-Li commented on code in PR #51192:
URL: https://github.com/apache/doris/pull/51192#discussion_r2109448370


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/util/StatisticsUtil.java:
##########
@@ -658,17 +660,21 @@ public static long getHiveRowCount(HMSExternalTable 
table) {
         // Table parameters contains row count, simply get and return it.
         if (parameters.containsKey(NUM_ROWS)) {
             long rows = Long.parseLong(parameters.get(NUM_ROWS));
+            if (rows <= 0 && parameters.containsKey(SPARK_NUM_ROWS)) {
+                rows = Long.parseLong(parameters.get(SPARK_NUM_ROWS));
+            }
             // Sometimes, the NUM_ROWS in hms is 0 but actually is not. Need 
to check TOTAL_SIZE if NUM_ROWS is 0.
             if (rows > 0) {
                 LOG.info("Get row count {} for hive table {} in table 
parameters.", rows, table.getName());
                 return rows;
             }

Review Comment:
   fixed



-- 
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...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to