morrySnow commented on code in PR #11755: URL: https://github.com/apache/doris/pull/11755#discussion_r947416955
########## fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterSelectivityCalculator.java: ########## @@ -107,4 +114,9 @@ public Double visitLessThan(LessThan lessThan, Void context) { return DEFAULT_SELECTIVITY; } + @Override + public Double visitInPredicate(InPredicate inPredicate, Void context) { Review Comment: maybe we need to let this class inherit ExpressionVisitor and then Override visit function like what u do, and remove all visitXXX function that do same thing with visit function ########## fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java: ########## @@ -195,9 +196,12 @@ private StatsDeriveResult computeFilter(Filter filter) { // 3. Get NDV and column data size from StatisticManger, StatisticManager doesn't support it now. private StatsDeriveResult computeScan(Scan scan) { Table table = scan.getTable(); - TableStats tableStats = Utils.execWithReturnVal(() -> - ConnectContext.get().getEnv().getStatisticsManager().getStatistics().getTableStats(table.getId()) - ); + TableStats tableStats = Utils.execWithReturnVal(() -> { + Statistics statistics = ConnectContext.get().getEnv().getStatisticsManager().getStatistics(); + // TODO: tmp mock the table stats, after we support the table stats, we should remove this mock. + statistics.mockTableStatsWithRowCount(scan.getTable().getId(), 0); Review Comment: u should use scan node to compute row count just like what original planner do rather than set row count to zero ########## fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/CostAndEnforcerJobTest.java: ########## @@ -1,102 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one Review Comment: why remove it? -- 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