forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 17
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
[CH-431] not change columns to nulllable in expand operator #433
Open
shuai-xu
wants to merge
765
commits into
Kyligence:clickhouse_backend
Choose a base branch
from
shuai-xu:CH-431
base: clickhouse_backend
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Refactor releasing process
Simplify strip for new packages
…l_flag Resurrect build hash
…ash_v2 One more try to resurrect build hash
New package clickhouse-keeper
Docker release and regular builds
Fix automatic bucket prefix for master
…id IPv6, IPv4 values
…ease Backport release to 22.3
Backport ClickHouse#35799 to 22.3: Fix extract function parser
Backport ClickHouse#35733 to 22.3: Added settings for insert of invalid IPv6, IPv4 values
Backport ClickHouse#35820 to 22.3: Avoid processing per-column TTL multiple times
- Allow define version as file - Add inline cache - Fix auto_release_type function
Support functions position/locate
…ence#354) ShuffleSplitter improvement: support multiple subdirs
Support full join with join condition Co-authored-by: shuai.li <shuai.li@kyligence.io>
Support Decimal type in Gluten Co-authored-by: shuai.li <shuai.li@kyligence.io>
…like Column 'deviceid' is not presented in input data (Kyligence#388)
Co-authored-by: shuai.li <shuai.li@kyligence.io>
…voking of JNI_Onload and finalized once at exit (Kyligence#377)
Co-authored-by: shuai.li <shuai.li@kyligence.io>
Support partitioning with expressions
Co-authored-by: Robert Schulze <robert@clickhouse.com>
Can one of the admins verify this patch? |
shuai-xu
changed the title
not change columns to nulllable in expand operator
[CH-431] not change columns to nulllable in expand operator
Apr 14, 2023
lgbo-ustc
reviewed
Apr 17, 2023
Comment on lines
62
to
76
if (i < aggregating_expressions_columns_.size()) | ||
{ | ||
// do nothing with the aggregating columns. | ||
cols.push_back(old_col); | ||
continue; | ||
} | ||
if (old_col.type->isNullable()) | ||
cols.push_back(old_col); | ||
else | ||
{ | ||
auto null_map = DB::ColumnUInt8::create(0, 0); | ||
auto null_col = DB::ColumnNullable::create(old_col.column, std::move(null_map)); | ||
auto null_type = std::make_shared<DB::DataTypeNullable>(old_col.type); | ||
cols.push_back(DB::ColumnWithTypeAndName(null_col, null_type, old_col.name)); | ||
} |
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 reason for adding nullable here is that , for group by a,b roll up
, the column a
, b
after this expand
node could be null. we will have the following cases
a | b | explain |
---|---|---|
original a's values | original b's values | equal to group by a,b |
original a's values | NULL | equal to group by a |
NULL | NULL | equal to group by empty keys |
liuneng1994
force-pushed
the
clickhouse_backend
branch
from
April 25, 2023 06:43
6528ff0
to
52be833
Compare
lwz9103
force-pushed
the
clickhouse_backend
branch
2 times, most recently
from
May 26, 2023 03:43
dc60d55
to
8066113
Compare
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
This pr fix the bug that columns type may be changed in expand operator, which will cause memory problem when serialize and deserialize them.
This close #431 .