You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/04/02 11:20:27 UTC
[GitHub] [hive] dengzhhu653 opened a new pull request #2145: HIVE-24969: Predicates are removed by PPD when left semi join followe…
dengzhhu653 opened a new pull request #2145:
URL: https://github.com/apache/hive/pull/2145
…d by lateral view
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
3. Ensure you have added or run the appropriate tests for your PR:
4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX: Your PR title ...'.
5. Be sure to keep the PR description updated to reflect all changes.
6. Please write your PR title to summarize what this PR proposes.
7. If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
If no, write 'No'.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 closed pull request #2145: HIVE-24969: Predicates are removed by PPD when left semi join followe…
Posted by GitBox <gi...@apache.org>.
dengzhhu653 closed pull request #2145:
URL: https://github.com/apache/hive/pull/2145
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] github-actions[bot] commented on pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-976027177
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 removed a comment on pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 removed a comment on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-833295319
Hi @jcamachor, RS has only one JOIN as his child when parsing the join tree, looks safe here to push down all predicates through RS if they are belong to the inputs of the RS. what do you think?
thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] github-actions[bot] closed pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #2145:
URL: https://github.com/apache/hive/pull/2145
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-899940388
@kgyrtkirk @jcamachor @vineetgarg02, any thoughts here?
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on a change in pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on a change in pull request #2145:
URL: https://github.com/apache/hive/pull/2145#discussion_r680344086
##########
File path: ql/src/test/results/clientpositive/llap/subquery_multi.q.out
##########
@@ -4769,7 +4769,7 @@ POSTHOOK: Input: default@tempty
85768 almond antique chartreuse lavender yellow Manufacturer#1 Brand#12 LARGE BRUSHED STEEL 34 SM BAG 1753.76 refull
86428 almond aquamarine burnished black steel Manufacturer#1 Brand#12 STANDARD ANODIZED STEEL 28 WRAP BAG 1414.42 arefully
90681 almond antique chartreuse khaki white Manufacturer#3 Brand#31 MEDIUM BURNISHED TIN 17 SM CASE 1671.68 are slyly after the sl
-Warning: Shuffle Join MERGEJOIN[39][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product
+Warning: Shuffle Join MERGEJOIN[39][tables = [$hdt$_0, $hdt$_2]] in Stage 'Reducer 3' is a cross product
Review comment:
Same as below, the `$hdt$_1` does not participate in `Reducer 3`, as it produces no output after the semi join(`p_name IN (select p_name from part_null)`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on a change in pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on a change in pull request #2145:
URL: https://github.com/apache/hive/pull/2145#discussion_r681545083
##########
File path: ql/src/test/results/clientpositive/llap/lateral_left_semi_join.q.out
##########
@@ -0,0 +1,305 @@
+Warning: Shuffle Join MERGEJOIN[54][tables = [sq_1_notin_nullcheck]] in Stage 'Reducer 3' is a cross product
Review comment:
Using the MR, the warning message is `Warning: Shuffle Join JOIN[34][tables = [lv, t, sq_1_notin_nullcheck]] in Stage 'Stage-1:MAPRED' is a cross product`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 removed a comment on pull request #2145: HIVE-24969: Predicates are removed by PPD when left semi join followe…
Posted by GitBox <gi...@apache.org>.
dengzhhu653 removed a comment on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-819216494
@kasakrisz @maheshk114 @jcamachor any thoughts here?
Thanks,
Zhihua Deng
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on a change in pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on a change in pull request #2145:
URL: https://github.com/apache/hive/pull/2145#discussion_r680428112
##########
File path: ql/src/test/results/clientpositive/llap/lateral_left_semi_join.q.out
##########
@@ -0,0 +1,305 @@
+Warning: Shuffle Join MERGEJOIN[54][tables = [sq_1_notin_nullcheck]] in Stage 'Reducer 3' is a cross product
Review comment:
One of the parent of `Reducer 3` is a union work(alias `T`), when CrossProductHandler [analyzes](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CrossProductHandler.java#L280-L289) the union work, as `work.getAllRootOperators()` returns an empty set, so the inputs of `t` and `lv` do not added to the reduce sink info of the join, cause the waring message missing some table aliases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 removed a comment on pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 removed a comment on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-833295319
Hi @jcamachor, RS has only one JOIN as his child when parsing the join tree, looks safe here to push down all predicates through RS if they are belong to the inputs of the RS. what do you think?
thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on pull request #2145: HIVE-24969: Predicates are removed by PPD when left semi join followe…
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-819216494
@kasakrisz @maheshk114 @jcamachor any thoughts here?
Thanks,
Zhihua Deng
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on a change in pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on a change in pull request #2145:
URL: https://github.com/apache/hive/pull/2145#discussion_r680344086
##########
File path: ql/src/test/results/clientpositive/llap/subquery_multi.q.out
##########
@@ -4769,7 +4769,7 @@ POSTHOOK: Input: default@tempty
85768 almond antique chartreuse lavender yellow Manufacturer#1 Brand#12 LARGE BRUSHED STEEL 34 SM BAG 1753.76 refull
86428 almond aquamarine burnished black steel Manufacturer#1 Brand#12 STANDARD ANODIZED STEEL 28 WRAP BAG 1414.42 arefully
90681 almond antique chartreuse khaki white Manufacturer#3 Brand#31 MEDIUM BURNISHED TIN 17 SM CASE 1671.68 are slyly after the sl
-Warning: Shuffle Join MERGEJOIN[39][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product
+Warning: Shuffle Join MERGEJOIN[39][tables = [$hdt$_0, $hdt$_2]] in Stage 'Reducer 3' is a cross product
Review comment:
Same as above, the `$hdt$_1` does not participate in `Reducer 3`, as it produces no output after the semi join(`p_name IN (select p_name from part_null)`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on a change in pull request #2145: HIVE-24969: Predicates may be removed when decorrelating subqueries with lateral
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on a change in pull request #2145:
URL: https://github.com/apache/hive/pull/2145#discussion_r680343400
##########
File path: ql/src/test/results/clientpositive/llap/subquery_multi.q.out
##########
@@ -246,7 +246,7 @@ POSTHOOK: Input: default@part_null
85768 almond antique chartreuse lavender yellow Manufacturer#1 Brand#12 LARGE BRUSHED STEEL 34 SM BAG 1753.76 refull
86428 almond aquamarine burnished black steel Manufacturer#1 Brand#12 STANDARD ANODIZED STEEL 28 WRAP BAG 1414.42 arefully
90681 almond antique chartreuse khaki white Manufacturer#3 Brand#31 MEDIUM BURNISHED TIN 17 SM CASE 1671.68 are slyly after the sl
-Warning: Shuffle Join MERGEJOIN[57][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Stage 'Reducer 4' is a cross product
+Warning: Shuffle Join MERGEJOIN[57][tables = [$hdt$_0, $hdt$_2, $hdt$_3]] in Stage 'Reducer 4' is a cross product
Review comment:
The `$hdt$_1` is omitted because `$hdt$_0` and `$hdt$_1` perform a left semi join, that is `p_name IN (select p_name from part_null)` in `Reducer 2`, the `$hdt$_1` does not produces output after this [join](https://github.com/apache/hive/blob/23b0d30051af3ade5b03496ab9cf22929168dc84/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L9109-L9118), only `$hdt$_0`, `$hdt$_2`(distinct p_brand) and `$hdt$_2`(count p_name) take place in `$hdt$_4`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 commented on pull request #2145: HIVE-24969: Predicates are removed by PPD when left semi join followe…
Posted by GitBox <gi...@apache.org>.
dengzhhu653 commented on pull request #2145:
URL: https://github.com/apache/hive/pull/2145#issuecomment-833295319
Hi @jcamachor, RS has only one JOIN as his child when parsing the join tree, looks safe here to push down all predicates through RS if they are belong to the inputs of the RS. what do you think?
thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] dengzhhu653 closed pull request #2145: HIVE-24969: Predicates are removed by PPD when left semi join followe…
Posted by GitBox <gi...@apache.org>.
dengzhhu653 closed pull request #2145:
URL: https://github.com/apache/hive/pull/2145
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org