morrySnow commented on code in PR #42028: URL: https://github.com/apache/doris/pull/42028#discussion_r1804722834
########## fe/fe-core/src/main/java/org/apache/doris/statistics/ColStatsData.java: ########## @@ -185,4 +185,24 @@ public ColumnStatistic toColumnStatistic() { return ColumnStatistic.UNKNOWN; } } + + public boolean isNull(String value) { + return value == null || value.equalsIgnoreCase("NULL"); Review Comment: why need `value.equalsIgnoreCase("NULL")` ? ########## fe/fe-core/src/main/java/org/apache/doris/statistics/BaseAnalysisTask.java: ########## @@ -484,6 +484,11 @@ protected void runQuery(String sql) { try (AutoCloseConnectContext a = StatisticsUtil.buildConnectContext(false)) { stmtExecutor = new StmtExecutor(a.connectContext, sql); ColStatsData colStatsData = new ColStatsData(stmtExecutor.executeInternalQuery().get(0)); + if (!colStatsData.isValid()) { + String message = String.format("ColStatsData is invalid, skip analyzing. %s", colStatsData.toSQL(true)); + LOG.info(message); Review Comment: warning? could we get table column and invalid data from log message? -- 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