-
Notifications
You must be signed in to change notification settings - Fork 412
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
storage: fix block rows not match when filter column is the first non-empty column in the block #9483
Conversation
…-empty column in the block Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
@@ -71,8 +71,6 @@ Block LateMaterializationBlockInputStream::read() | |||
} | |||
for (auto & col : filter_column_block) | |||
{ | |||
if (col.name == filter_column_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.
Why not try continue filter_column_name
like the code below?
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.
col_filter
is not a ColumnRef in filter_column_block, filter_column in filter_column_block can call filter here.
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.
In filterFilterColumnBlock
, if header.has(filter_column_name)
is false, filter_column
will not be filtered.
I mean why not skip filtering filter_column
here when header.has(filter_column_name)
is false like function filterFilterColumnBlock
does?
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.
Fixed
dbms/src/Storages/DeltaMerge/LateMaterializationBlockInputStream.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
dbms/src/Storages/DeltaMerge/LateMaterializationBlockInputStream.cpp
Outdated
Show resolved
Hide resolved
…am.cpp Co-authored-by: JaySon <[email protected]>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, JinheLin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
…-empty column in the block (#9483) (#9493) ref #9472 storage: fix block rows not match when the filter column is the first non-empty column in the block Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Lloyd-Pottiger <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]>
…-empty column in the block (#9483) (#9495) ref #9472 storage: fix block rows not match when the filter column is the first non-empty column in the block Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Lloyd-Pottiger <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]>
What problem does this PR solve?
Issue Number: ref #9472
Problem Summary:
What is changed and how it works?
Try to fix #9472, failed to reproduce the issue. But when the filter column is the first non-empty column in the block,
block.rows() = filter_column->size()
, but filter_column is not filtered, so the rows may not match.But filter_column is usually added to the back of the block, so it is kind of weird.
Check List
Tests
Side effects
Documentation
Release note