mirror of
https://github.com/apache/impala.git
synced 2026-01-27 06:10:53 -05:00
If all primary key columns of the Kudu table are in equivalence predicates pushed down to Kudu, Kudu will return at most one row. In this case, we can adjust the cardinality estimation to speed up point lookup. This patch sets the input and output cardinality as 1 if the number of primary key columns in equivalence predicates pushed down to Kudu equals the total number of primary key columns of the Kudu table, hence enable small query optimization. Testing: - Added test cases in following PlannerTest: small-query-opt.test, disable-codegen.test and kudu.test. - Passed all FE tests, including new test cases. Change-Id: I4631cd4d1a528a1152b5cdcb268426f2ba1a0c08 Reviewed-on: http://gerrit.cloudera.org:8080/15250 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>