You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Daniel Becker (Code Review)" <ge...@cloudera.org> on 2022/01/25 12:41:46 UTC

[Impala-ASF-CR] IMPALA-11067: Unify struct subexpressions in rows

Daniel Becker has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18137


Change subject: IMPALA-11067: Unify struct subexpressions in rows
......................................................................

IMPALA-11067: Unify struct subexpressions in rows

If a column is given multiple times in the select list, it is not
duplicated in the row because we recognise that multiple columns in the
result reference the same actual column, therefore the row size does not
increase.

However, if we query a struct and a subfield of the same struct, we do
not reuse the existing slot in the row but duplicate the subexpression,
increasing the row size.

This change makes it possible for struct field expressions to use the
same memory in the row as their enclosing struct. This way the row size
does not increase if a struct and a field (or recursively embedded
field) are both selected in the query compared to when only the struct
is selected.

Testing:
  - added the test PlannerTest.testStructFieldSlotSharedWithStruct in
    fe/src/test/java/org/apache/impala/planner/PlannerTest.java to
    verify that the row size does not increase in the situation
    described above.

Change-Id: Ib2ab4ed2047179f59fb09f036735ff549a69a8cf
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
M fe/src/main/java/org/apache/impala/analysis/Path.java
M fe/src/main/java/org/apache/impala/analysis/SelectStmt.java
M fe/src/main/java/org/apache/impala/analysis/SlotRef.java
M fe/src/main/java/org/apache/impala/analysis/SortInfo.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java
M fe/src/test/java/org/apache/impala/planner/PlannerTest.java
M testdata/workloads/functional-query/queries/QueryTest/nested-struct-in-select-list.test
8 files changed, 318 insertions(+), 64 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/37/18137/3
-- 
To view, visit http://gerrit.cloudera.org:8080/18137
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2ab4ed2047179f59fb09f036735ff549a69a8cf
Gerrit-Change-Number: 18137
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>

[Impala-ASF-CR] IMPALA-11067: Unify struct subexpressions in rows

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18137 )

Change subject: IMPALA-11067: Unify struct subexpressions in rows
......................................................................


Patch Set 3:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/10040/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/18137
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2ab4ed2047179f59fb09f036735ff549a69a8cf
Gerrit-Change-Number: 18137
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Jan 2022 13:03:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-11067: Unify struct subexpressions in rows

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18137 )

Change subject: IMPALA-11067: Unify struct subexpressions in rows
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/18137/3/fe/src/main/java/org/apache/impala/analysis/Analyzer.java
File fe/src/main/java/org/apache/impala/analysis/Analyzer.java:

http://gerrit.cloudera.org:8080/#/c/18137/3/fe/src/main/java/org/apache/impala/analysis/Analyzer.java@1379
PS3, Line 1379:       // 'slotPath' refers to a struct that has no ancestor that is also needed in the query. We also
line too long (101 > 90)



-- 
To view, visit http://gerrit.cloudera.org:8080/18137
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2ab4ed2047179f59fb09f036735ff549a69a8cf
Gerrit-Change-Number: 18137
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Jan 2022 12:44:34 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-11067: Unify struct subexpressions in rows

Posted by "Daniel Becker (Code Review)" <ge...@cloudera.org>.
Daniel Becker has abandoned this change. ( http://gerrit.cloudera.org:8080/18137 )

Change subject: IMPALA-11067: Unify struct subexpressions in rows
......................................................................


Abandoned

Incorporated into https://gerrit.cloudera.org/#/c/17847/
-- 
To view, visit http://gerrit.cloudera.org:8080/18137
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: Ib2ab4ed2047179f59fb09f036735ff549a69a8cf
Gerrit-Change-Number: 18137
Gerrit-PatchSet: 3
Gerrit-Owner: Daniel Becker <da...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>