Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17038 )

Change subject: IMPALA-10482, IMPALA-10493: Fix bugs in full ACID collection 
query rewrites
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/17038/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17038/3//COMMIT_MSG@34
PS3, Line 34: When AcidRewriter.splitCollectionRef() creates a new collection 
ref
            : it doesn't copy every information needed to correctly execute the
            : query. E.g. it dropped the ON clause, turning INNER joins to CROSS
            : joins.
I think copying the join stuffs is not enough. We are rewritting "A join B" to 
"A join B1 join B2". This is ok for inner join but may be incorrect for outer 
joins. Here is an example, the two queries produce different results:

impala> with v as (
  select ('k4') as key
  union all
  values ('k1'), ('k2'), ('k3')
) select * from v left join functional_parquet.complextypestbl.int_map using 
(key);
+-----+------+-------+
| key | key  | value |
+-----+------+-------+
| k1  | k1   | -1    |
| k1  | k1   | 1     |
| k2  | k2   | 100   |
| k1  | k1   | 2     |
| k2  | k2   | NULL  |
| k1  | k1   | NULL  |
| k3  | k3   | NULL  |
| k4  | NULL | NULL  |
+-----+------+-------+
Fetched 8 row(s) in 3.35s

impala> with v as (
  select ('k4') as key
  union all
  values ('k1'), ('k2'), ('k3')
) select * from v left join functional_orc_def.complextypestbl.int_map using 
(key);
+-----+-----+-------+
| key | key | value |
+-----+-----+-------+
| k1  | k1  | -1    |
| k1  | k1  | 1     |
| k2  | k2  | 100   |
| k1  | k1  | 2     |
| k2  | k2  | NULL  |
| k1  | k1  | NULL  |
| k3  | k3  | NULL  |
+-----+-----+-------+
Fetched 7 row(s) in 0.35s

Maybe we need to replace the original table ref with an inlineview (similar to 
what we've done for column masking).



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8fc758d3c1e75c7066936d590aec8bff8d2b00b0
Gerrit-Change-Number: 17038
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Wed, 10 Feb 2021 08:51:05 +0000
Gerrit-HasComments: Yes

Reply via email to