Quanlong Huang has posted comments on this change. ( https://gerrit.cloudera.org/25001 )
Change subject: IMPALA-15778: Use HBO row counts in Calcite scans ...................................................................... Patch Set 6: (7 comments) https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.java: https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/CalciteTable.java@268 PS6, Line 268: "HBOStats.TotalTime" nit: use HistoricalStats.HBO_STATS_TOTAL_TIME instead of the string literal https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java File java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java: https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java@151 PS6, Line 151: QUERY Could you add one with a filter, e.g. "... where bigint_col = 10" with unfiltered history of 321, expecting about 32.1 (same selectivity pattern as TestCalciteStats.testFilterNotEquals)? https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java@154 PS6, Line 154: RelNode plan = logicalPlan(true); : while (!(plan instanceof TableScan)) plan = plan.getInput(0); : CalciteTable table = ((TableScan) plan).getTable().unwrap(CalciteTable.class); nit: This duplicates several times. Can we extract them into a shared method? https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java@195 PS6, Line 195: stats.setNumDistinctValues(catalogNdv); nit: can we add a comment for why we update an returned object and how it impacts the test? https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java@222 PS6, Line 222: public void testUnknownHistoricalInputRows() throws ImpalaException { All tests use functional.alltypes, which has full stats. Could you add a test on a table without stats, e.g. functional_parquet.alltypestiny? https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java@299 PS6, Line 299: String query = "select o_orderkey from tpch_parquet.orders"; Maybe using functional_parquet.alltypes is simpler so you don't need the TPCH dataset. Also, could you add a TABLESAMPLE negative test next to this one, e.g. "select id from functional.alltypes tablesample system(10)" with the "|<SAMPLE:" marker? https://gerrit.cloudera.org/#/c/25001/6/java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/TestCalciteHboStats.java@316 PS6, Line 316: public void testZeroHistory() throws ImpalaException { nit: this looks similar to testZeroHboRowCountCapsNdv. Can we merge them? -- To view, visit https://gerrit.cloudera.org/25001 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f530098d34869cda5ff36a06576bb4854ad7f4f Gerrit-Change-Number: 25001 Gerrit-PatchSet: 6 Gerrit-Owner: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Aleksandr Efimov <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Tue, 24 Nov 2026 12:33:36 +0000 Gerrit-HasComments: Yes
