-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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 empty tuple handling in a few formats #72616
Conversation
This is an automated comment for commit 2098ab3 with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
|
||
# Formats that don't support empty tuples. | ||
$CLICKHOUSE_LOCAL -q " | ||
insert into function file('$FILE', 'Parquet') select () settings engine_file_truncate_on_insert=1; -- {serverError BAD_ARGUMENTS} |
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.
How does it come that this results in BAD_ARGUMENTS
, while the similar query in 02735_parquet_encoder.sql
returns PARQUET_EXCEPTION
?
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, 02735_parquet_encoder.sql
failed:
024-11-29 03:46:31 Expected server error code: 723 but got: 36 (query: insert into function file(empty_tuple_02735.parquet) select (); -- {serverError PARQUET_EXCEPTION}).
2024-11-29 03:46:31 Received exception from server (version 24.12.1):
2024-11-29 03:46:31 Code: 36. DB::Exception: Received from localhost:9000. DB::Exception: Parquet doesn't support empty tuples. (BAD_ARGUMENTS)
2024-11-29 03:46:31 (query: insert into function file(empty_tuple_02735.parquet) select (); -- {serverError PARQUET_EXCEPTION})
So I guess that should be changed.
And I think this is a noticeable bugfix, so it makes sense to have a changelog entry. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix handling of empty tuples in some input and output formats (e.g. Parquet, Arrow).
Closes #71583
When writing or reading empty tuples, a few formats were returning LOGICAL_ERROR, a couple formats were crashing. Here are the trivial fixes.