-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BugFix] MaxBy/MinBy not filter nulls #51354
[BugFix] MaxBy/MinBy not filter nulls #51354
Conversation
d83b06c
to
5947e16
Compare
5947e16
to
b20d5d6
Compare
Signed-off-by: satanson <[email protected]>
b20d5d6
to
2a28107
Compare
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 21 / 21 (100.00%) file detail
|
[BE Incremental Coverage Report]❌ fail : 231 / 335 (68.96%) file detail
|
"max_by", true, AggregateFactory::MakeMaxByAggregateFunction<arg_type>()); | ||
resolver->add_aggregate_mapping_notnull<arg_type, ret_type>( | ||
"max_by", true, AggregateFactory::MakeMaxByAggregateFunction<arg_type, false>()); | ||
resolver->add_aggregate_mapping_notnull<arg_type, ret_type>( |
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.
Why using add_aggregate_mapping_notnull
? What will happen if y
is a nullable column for max_by(x, y)
?
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.
Oh, it seems that nullable columns are handled by MaxBy
itself now.
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.
yes, null is acceptable output values, so max_by/min_by agg cannot be wrapped by NullableAggFunction
@Mergifyio backport branch-3.3 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) # Conflicts: # be/src/exprs/agg/factory/aggregate_factory.cpp # fe/fe-core/src/main/java/com/starrocks/catalog/combinator/AggStateDesc.java # test/sql/test_agg_state/R/test_agg_state_table_with_all_functions.sql
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) # Conflicts: # be/src/exprs/agg/factory/aggregate_factory.cpp # fe/fe-core/src/main/java/com/starrocks/catalog/Function.java # fe/fe-core/src/main/java/com/starrocks/catalog/combinator/AggStateDesc.java # test/sql/test_agg_state/R/test_agg_state_table_with_all_functions.sql
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) # Conflicts: # be/src/exprs/agg/factory/aggregate_factory.cpp # fe/fe-core/src/main/java/com/starrocks/catalog/Function.java # fe/fe-core/src/main/java/com/starrocks/catalog/combinator/AggStateDesc.java # test/sql/test_agg_state/R/test_agg_state_table_with_all_functions.sql
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) # Conflicts: # be/src/exprs/agg/factory/aggregate_factory.cpp # be/src/exprs/agg/factory/aggregate_factory.hpp # be/src/exprs/agg/factory/aggregate_resolver_minmaxany.cpp # be/src/exprs/agg/maxmin_by.h # be/test/exprs/agg/aggregate_test.cpp # fe/fe-core/src/main/java/com/starrocks/catalog/Function.java # fe/fe-core/src/main/java/com/starrocks/catalog/FunctionSet.java # fe/fe-core/src/main/java/com/starrocks/catalog/combinator/AggStateDesc.java # test/sql/test_agg_state/R/test_agg_state_table_with_all_functions.sql
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) # Conflicts: # be/src/exec/analytor.cpp # be/src/exprs/agg/factory/aggregate_factory.cpp # be/src/exprs/agg/factory/aggregate_factory.hpp # be/src/exprs/agg/factory/aggregate_resolver_minmaxany.cpp # be/src/exprs/agg/maxmin_by.h # be/test/exprs/agg/aggregate_test.cpp # fe/fe-core/src/main/java/com/starrocks/analysis/FunctionName.java # fe/fe-core/src/main/java/com/starrocks/catalog/Function.java # fe/fe-core/src/main/java/com/starrocks/catalog/FunctionSet.java # fe/fe-core/src/main/java/com/starrocks/catalog/combinator/AggStateDesc.java # test/sql/test_agg_state/R/test_agg_state_table_with_all_functions.sql
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> Co-authored-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> (cherry picked from commit 9398edd) Signed-off-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> Co-authored-by: satanson <[email protected]>
Signed-off-by: satanson <[email protected]> Signed-off-by: zhiminr.ren <[email protected]>
Why I'm doing:
max_by/min_by should not filter nulls, for an example:
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: