-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BugFix] MV partitioned by non-SlotRef Expr can not be decomposed in query cache #56871
Conversation
…query cache Signed-off-by: satanson <[email protected]>
Pair<Long, Range<PartitionKey>> partitionKeyRange = rangeMap.get(i); | ||
// when the range is to total cover this partition, we also cache it | ||
if (!range.isEmpty()) { | ||
selectedRangeMap.put(partitionKeyRange.first, range.toString()); | ||
if (optRange.isPresent() && !optRange.get().isEmpty()) { |
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.
Is it possiable two different partition has the same selectedRange?
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.
Impossible, at present, only single column range partition is take into consideration, so partitions are not intersected with each other. A selected range is just a sub-range of a certain partition.
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]❌ fail : 29 / 38 (76.32%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.3 |
@Mergifyio backport branch-3.4 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
…query cache (#56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/catalog/ExpressionRangePartitionInfo.java # fe/fe-core/src/main/java/com/starrocks/catalog/ExpressionRangePartitionInfoV2.java # fe/fe-core/src/main/java/com/starrocks/planner/FragmentNormalizer.java # fe/fe-core/src/main/java/com/starrocks/planner/OlapScanNode.java
…query cache (#56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/planner/FragmentNormalizer.java
…query cache (#56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f)
…query cache (backport #56871) (#56909) Co-authored-by: satanson <[email protected]>
…query cache (#56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) Signed-off-by: satanson <[email protected]> (cherry picked from commit 7b82d5f) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) (#56935) Signed-off-by: satanson <[email protected]>
…query cache (backport #56871) (#56933) Signed-off-by: satanson <[email protected]>
Why I'm doing:
When query cache is enabled, some query report errors as follows:
we can reproduce this error as follow steps:
The reason is that when query cache is enabled, we try to decompose the the filter ss_sold_date='20001231', at first is converted to a range ['20001231', '20001231'], it happens overlap MV's partition ['2000-12-31', ''2001-01-01'), then the range tries to be converted a closedOpen range and it fails, since '20001231' can not be recognized as a legal date string(legcal date string must be in format %Y-%m-%d).
What I'm doing:
MV's partition expr as follows can be decomposed
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: