-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 reading from type object #35687
Fix reading from type object #35687
Conversation
auto name_in_storage = Nested::extractTableName(columns[i]); | ||
if (storage_columns.has(name_in_storage) && isObject(storage_columns.get(name_in_storage).type)) | ||
{ | ||
have_at_least_one_physical_column = true; | ||
continue; | ||
} | ||
|
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.
The bug is here actually. Previously we set have_at_least_one_physical_column
to true if we read the subcolumn of Object
type, but it could be wrong for parts in which this subcolumn is absent. So, in case when we read only this subcolumn without any other physical columns an error accured.
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.
LGTM
Backport #35687 to 22.3: Fix reading from type object
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix possible
Can't adjust last granule
exception while reading subcolumns of typeObject
.Fixes #35407.