Skip to content
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

groupArray & aggregate_functions_null_for_empty = DB::Exception #38738

Open
den-crane opened this issue Jul 2, 2022 · 3 comments
Open

groupArray & aggregate_functions_null_for_empty = DB::Exception #38738

den-crane opened this issue Jul 2, 2022 · 3 comments

Comments

@den-crane
Copy link
Contributor

SELECT groupArray(number)
FROM numbers(10)
SETTINGS aggregate_functions_null_for_empty = 1

Query id: ab4c14d4-4d32-4baa-99f5-d2dd91dde25c


0 rows in set. Elapsed: 0.023 sec.

Received exception from server (version 22.7.1):
Code: 43. DB::Exception: Received from localhost:9000. 
DB::Exception: Nested type Array(UInt64) cannot be inside Nullable type. (ILLEGAL_TYPE_OF_ARGUMENT)
@Alex-Cheng
Copy link
Contributor

The aggregate_functions_null_for_empty brainlessly add -OrNull suffix to every aggregate functions, including groupArray, but groupArray cannot be with -OrNull because the result type Array cannot be Nullable(Array).

@den-crane
Copy link
Contributor Author

solved #48593

@den-crane
Copy link
Contributor Author

reverted #49971

@den-crane den-crane reopened this Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants