-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add test to verify count
aggregate function should not be nullable
#12085
Conversation
@@ -5364,6 +5364,11 @@ SELECT MAX(col0) FROM empty WHERE col0=1; | |||
---- | |||
NULL | |||
|
|||
query I |
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.
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
Thank you for this contribution @HuSen8891 |
issue #12077 already solved, close this. |
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
Sure. Current branch is deleted, I'll add the test in another PR. |
PR was #12100 |
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?