Add test to verify count aggregate function should not be nullable#12085
Closed
HuSen8891 wants to merge 2 commits intoapache:mainfrom
Closed
Add test to verify count aggregate function should not be nullable#12085HuSen8891 wants to merge 2 commits intoapache:mainfrom
count aggregate function should not be nullable#12085HuSen8891 wants to merge 2 commits intoapache:mainfrom
Conversation
alamb
reviewed
Aug 20, 2024
| ---- | ||
| NULL | ||
|
|
||
| query I |
Contributor
There was a problem hiding this comment.
On main this query fails like this:
creatDataFusion CLI v41.0.0
> create table empty;
0 row(s) fetched.
Elapsed 0.008 seconds.
> select distinct count() from empty;
CombinePartialFinalAggregate
caused by
Internal error: PhysicalOptimizer rule 'CombinePartialFinalAggregate' failed, due to generate a different schema, original schema: Schema { fields: [Field { name: "count()", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata: {} }, new schema: Schema { fields: [Field { name: "count()", data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }], metadata: {} }.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
alamb
reviewed
Aug 20, 2024
Contributor
|
Thank you for this contribution @HuSen8891 |
Contributor
Author
|
issue #12077 already solved, close this. |
Contributor
|
Thanks @HuSen8891 -- I double checked and it does seem to be fixed on main. However, I don't think we have the test. Could you please update the PR to just have the additional test? DataFusion CLI v41.0.0
> create table empty;
0 row(s) fetched.
Elapsed 0.007 seconds.
> select distinct count() from empty;
+---------+
| count() |
+---------+
| 0 |
+---------+
1 row(s) fetched.
Elapsed 0.010 seconds.
> |
count aggregate function should not be nullable
Contributor
Author
Sure. Current branch is deleted, I'll add the test in another PR. |
Contributor
PR was #12100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #12077
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?