-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[fix](nereids) not rewrite first_value when first_value ignore nulls #45065
Conversation
6239af7
to
8c163a1
Compare
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 39776 ms
|
TPC-DS: Total hot run time: 190850 ms
|
ClickBench: Total hot run time: 31.96 s
|
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/WindowFunctionChecker.java
Outdated
Show resolved
Hide resolved
run cloud_p0 |
1 similar comment
run cloud_p0 |
9e92b94
to
1b7d53f
Compare
run buildall |
33fe9d3
to
457d16d
Compare
run buildall |
TPC-H: Total hot run time: 39933 ms
|
TPC-DS: Total hot run time: 197176 ms
|
ClickBench: Total hot run time: 31.95 s
|
457d16d
to
286d2c8
Compare
run buildall |
if (!firstValue.child(1).isConstant()) { | ||
throw new AnalysisException("The second parameter of first_value must be constant"); | ||
} |
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.
maybe we should add this check in org.apache.doris.nereids.trees.expressions.functions.window.FirstOrLastValue
.
let impl checkLegalityBeforeTypeCoercion
TPC-H: Total hot run time: 39821 ms
|
TPC-DS: Total hot run time: 197688 ms
|
ClickBench: Total hot run time: 32.63 s
|
286d2c8
to
ec75860
Compare
4b6689a
to
83969fd
Compare
run buildall |
TPC-H: Total hot run time: 40115 ms
|
TPC-DS: Total hot run time: 197242 ms
|
ClickBench: Total hot run time: 33.02 s
|
PR approved by at least one committer and no changes requested. |
…gnore nulls #45065 (#45236) Cherry-picked from #45065 Co-authored-by: feiniaofeiafei <[email protected]>
…44996) ### What problem does this PR solve? Problem Summary: needs another prs of FE: #45065 #45264 1. the first value even if have set value, should not return directly, need check it whether need arg_ignore_null, as maybe it's NULL 2. the last_value if need arg_ignore_null and not set value, should find in while loop, if find could return directly, not find check iff has any value before ### Release note fix first_value/last_value return error with ignore null param is true
…44996) ### What problem does this PR solve? Problem Summary: needs another prs of FE: #45065 #45264 1. the first value even if have set value, should not return directly, need check it whether need arg_ignore_null, as maybe it's NULL 2. the last_value if need arg_ignore_null and not set value, should find in while loop, if find could return directly, not find check iff has any value before ### Release note fix first_value/last_value return error with ignore null param is true
…44996) ### What problem does this PR solve? Problem Summary: needs another prs of FE: #45065 #45264 1. the first value even if have set value, should not return directly, need check it whether need arg_ignore_null, as maybe it's NULL 2. the last_value if need arg_ignore_null and not set value, should find in while loop, if find could return directly, not find check iff has any value before ### Release note fix first_value/last_value return error with ignore null param is true
…gnore nulls #45065 (#45235) Cherry-picked from #45065 Co-authored-by: feiniaofeiafei <[email protected]>
…44996) ### What problem does this PR solve? Problem Summary: needs another prs of FE: #45065 #45264 1. the first value even if have set value, should not return directly, need check it whether need arg_ignore_null, as maybe it's NULL 2. the last_value if need arg_ignore_null and not set value, should find in while loop, if find could return directly, not find check iff has any value before ### Release note fix first_value/last_value return error with ignore null param is true
…pache#44996) ### What problem does this PR solve? Problem Summary: needs another prs of FE: apache#45065 apache#45264 1. the first value even if have set value, should not return directly, need check it whether need arg_ignore_null, as maybe it's NULL 2. the last_value if need arg_ignore_null and not set value, should find in while loop, if find could return directly, not find check iff has any value before ### Release note fix first_value/last_value return error with ignore null param is true
What problem does this PR solve?
this pr fix 2 things:
1.when first_value/last_value second parameter is true, which means ignore nulls, fe should not do some rewrite.
2.adding check that first_value/last_value second parameter must be true or false.
Issue Number: close #xxx
Related PR: #44996 #27623
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)