Skip to content

Conversation

@EmmyMiao87
Copy link
Contributor

@EmmyMiao87 EmmyMiao87 commented Sep 11, 2020

Change-Id: Ibe67a389235b716d260f600edf7a0f9d9d4242b4

Proposed changes

When the keystype of mv and base table is difference, Doris should execute sorting schema change instead of linked schema change.
If doesn't, the data size of mv actually is same as base table. This will cause mv to have no pre-aggregation effect at all.
The query will not choose mv.

This commit fixed this problem. Fixed #4586

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • [] Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] If this change need a document change, I have updated the document
  • [] Any dependent changes have been merged

When the keystype of mv and base table is difference, Doris should execute sorting schema change instead of linked schema change.
If doesn't, the data size of mv actually is same as base table. This will cause mv to have no pre-aggregation effect at all.
The query will not choose mv.

This commit fixed this problem. Fixed apache#4586

Change-Id: Ibe67a389235b716d260f600edf7a0f9d9d4242b4
@EmmyMiao87 EmmyMiao87 added kind/fix Categorizes issue or PR as related to a bug. area/schema-change Issues or PRs related to schema change area/materialized-view Issues or PRs related to materialized view labels Sep 11, 2020
Change-Id: Ib4b59f7cfe6e0e30d0740257e9bf073659807e88
@EmmyMiao87
Copy link
Contributor Author

Fixed #3660

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Sep 12, 2020
@morningman morningman merged commit e8e5f35 into apache:master Sep 13, 2020
morningman pushed a commit that referenced this pull request Sep 14, 2020
When the keystype of mv and base table is difference, Doris should execute
sorting schema change instead of linked schema change.
If doesn't, the data size of mv actually is same as base table.
This will cause mv to have no pre-aggregation effect at all.
The query will not choose mv.

This commit fixed this problem. Fixed #4586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/materialized-view Issues or PRs related to materialized view area/schema-change Issues or PRs related to schema change kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query does not select the best materialized view

2 participants