Hello Aleksandr Efimov, Michael Smith, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24718

to look at the new patch set (#4).

Change subject: IMPALA-15278: Fix incorrect cardinality with OFFSET
......................................................................

IMPALA-15278: Fix incorrect cardinality with OFFSET

OFFSET is used to skip a number of rows before returning results. When
calculating cardinality of a node that has OFFSET, the cardinality
should substract this number before applying the LIMIT.

MERGING-EXCHANGE currently does the reverse which could results in 0
cardinality when OFFSET >= LIMIT. SortNode currently ignores the offset.
This fixes both issue by adding an overload of capCardinalityAtLimit()
that has a parameter for offset. It's used in ExchangeNode and SortNode.

Tests
 - Added FE test
 - Ran PlannerTest, TpcdsCpuCostPlannerTest and
   TpcdsTupleCachePlannerTest locally.

Change-Id: I3b628beabc5c7ec6c4fdda9dff6aaf7a4acae538
---
M fe/src/main/java/org/apache/impala/planner/ExchangeNode.java
M fe/src/main/java/org/apache/impala/planner/PlanNode.java
M fe/src/main/java/org/apache/impala/planner/SortNode.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
A 
testdata/workloads/functional-planner/queries/PlannerTest/card-limit-offset.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/inline-view-limit.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/ddl.test
M 
testdata/workloads/functional-planner/queries/PlannerTest/tpcds_tuple_cache/ddl.test
8 files changed, 169 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/18/24718/4
--
To view, visit http://gerrit.cloudera.org:8080/24718
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3b628beabc5c7ec6c4fdda9dff6aaf7a4acae538
Gerrit-Change-Number: 24718
Gerrit-PatchSet: 4
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>

Reply via email to