-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feature](nereids)support subquery in select list #23271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
run buildall |
b051155 to
505c9ab
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
| topDown(new EliminateGroupByConstant()), | ||
| topDown(new NormalizeAggregate()), | ||
| bottomUp(new SubqueryToApply()), | ||
| bottomUp(new CheckAnalysis()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need check again?
| bottomUp(new PullUpProjectUnderApply()), | ||
| topDown(new PushdownFilterThroughProject()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we put them into costBased(...) ?
| (expr instanceof Slot && !(expr instanceof MarkJoinSlotReference)) | ||
| || (expr instanceof Alias && ((Alias) expr).child() instanceof Slot | ||
| && !(((Alias) expr).child() instanceof MarkJoinSlotReference)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need add more ut about this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this file to rules/analyis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this file to rules/analyis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this file to rules/analyis
| ImmutableList<Set> subqueryExprsList = project.getProjects().stream() | ||
| .map(e -> (Set) e.collect(SubqueryExpr.class::isInstance)) | ||
| .collect(ImmutableList.toImmutableList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ImmutableList<Set> subqueryExprsList = project.getProjects().stream() | |
| .map(e -> (Set) e.collect(SubqueryExpr.class::isInstance)) | |
| .collect(ImmutableList.toImmutableList()); | |
| ImmutableList<Set<SubqueryExpr>> subqueryExprsList = project.getProjects().stream() | |
| .<Set<SubqueryExpr>>map(e -> e.collect(SubqueryExpr.class::isInstance)) | |
| .collect(ImmutableList.toImmutableList()); |
| if (subqueryExprsList.stream().flatMap(Collection::stream) | ||
| .noneMatch(SubqueryExpr.class::isInstance)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (subqueryExprsList.stream().flatMap(Collection::stream) | |
| .noneMatch(SubqueryExpr.class::isInstance)) { | |
| if (subqueryExprsList.stream().flatMap(Collection::stream).count() == 0) { |
| return project; | ||
| } | ||
| List<NamedExpression> oldProjects = ImmutableList.copyOf(project.getProjects()); | ||
| List<NamedExpression> newProjects = Lists.newArrayList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ImmutableList.Builder instead of Lists.newArrayList()
f453c72 to
ade7674
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
ade7674 to
cd18d91
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
| if (subqueryExprsList.stream().flatMap(Collection::stream).count() == 0) { | ||
| return project; | ||
| } | ||
| List<NamedExpression> oldProjects = ImmutableList.copyOf(project.getProjects()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This copy is redundant?
1. add scalar subquery's output to LogicalApply's output 2. for in and exists subquery's, add mark join slot into LogicalApply's output 3. forbid push down alias through join if the project list have any mark join slots. 4. move normalize aggregate rule to analysis phase
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal fix string cast to datetimev2 error introduced by PR apache#26827 we should cast to exactly scale of datetimev2 when cast string to it
…ed (#28959) FIX 1. remove float and double literal toString and getStringValue introduced by PR #23504 and PR #23271 These functions lead to wrong cast result of double and float literal 2. fix compute signature for datetimev2 always produce scale 6 3. fix stats calculator failed when generate node stats with two same column 4. constant fold on fe failed when cast double to integral TODO after fix the first problem, some mv matching not work well, fix them later - test_dup_mv_div - test_dup_mv_json - test_tcu
…ed (#28959) FIX 1. remove float and double literal toString and getStringValue introduced by PR #23504 and PR #23271 These functions lead to wrong cast result of double and float literal 2. fix compute signature for datetimev2 always produce scale 6 3. fix stats calculator failed when generate node stats with two same column 4. constant fold on fe failed when cast double to integral TODO after fix the first problem, some mv matching not work well, fix them later - test_dup_mv_div - test_dup_mv_json - test_tcu
…ed (apache#28959) FIX 1. remove float and double literal toString and getStringValue introduced by PR apache#23504 and PR apache#23271 These functions lead to wrong cast result of double and float literal 2. fix compute signature for datetimev2 always produce scale 6 3. fix stats calculator failed when generate node stats with two same column 4. constant fold on fe failed when cast double to integral TODO after fix the first problem, some mv matching not work well, fix them later - test_dup_mv_div - test_dup_mv_json - test_tcu
Proposed changes
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...