[Fix](nereids) fix create view and alter view using old parser checking#43263
Merged
morrySnow merged 5 commits intoapache:masterfrom Nov 22, 2024
Merged
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Contributor
Author
|
run buildall |
1 similar comment
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 41561 ms |
TPC-DS: Total hot run time: 191835 ms |
ClickBench: Total hot run time: 33.28 s |
fc35092 to
52f90aa
Compare
Contributor
Author
|
run buildall |
52f90aa to
77f898d
Compare
Contributor
Author
|
run buildall |
77f898d to
6fab571
Compare
Contributor
Author
|
run compile |
1a9dd02 to
e97063f
Compare
Contributor
Author
|
run buildall |
morrySnow
approved these changes
Nov 20, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
starocean999
approved these changes
Nov 20, 2024
morningman
approved these changes
Nov 21, 2024
github-actions bot
pushed a commit
that referenced
this pull request
Nov 22, 2024
…ng (#43263) Problem: Creating a view on a table with materialized views (MV) results in an error: failed to init view stmt. For example, executing the following SQL: create view v1 as select * from t1 index t_mv_mv. Root Cause: The syntax index t_mv_mv is supported only by the new planner and not by the old planner. During the view creation process, regardless of whether the new or old optimizer is used, the process eventually calls the createView method in Env. In the createView method, the persisted SQL of the view is parsed using the old optimizer's parser. If the parsing fails, an error is thrown. As a result, if the SQL for creating a view includes syntax supported only by the new optimizer, an error occurs. Solution: This PR addresses the issue by removing the parsing check from the createView method in Env. Instead, the check is moved to the respective classes responsible for creating views in the new and old optimizers.
github-actions bot
pushed a commit
that referenced
this pull request
Nov 22, 2024
…ng (#43263) Problem: Creating a view on a table with materialized views (MV) results in an error: failed to init view stmt. For example, executing the following SQL: create view v1 as select * from t1 index t_mv_mv. Root Cause: The syntax index t_mv_mv is supported only by the new planner and not by the old planner. During the view creation process, regardless of whether the new or old optimizer is used, the process eventually calls the createView method in Env. In the createView method, the persisted SQL of the view is parsed using the old optimizer's parser. If the parsing fails, an error is thrown. As a result, if the SQL for creating a view includes syntax supported only by the new optimizer, an error occurs. Solution: This PR addresses the issue by removing the parsing check from the createView method in Env. Instead, the check is moved to the respective classes responsible for creating views in the new and old optimizers.
This file contains hidden or 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
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.
What problem does this PR solve?
Problem:
Creating a view on a table with materialized views (MV) results in an error: failed to init view stmt. For example, executing the following SQL:
create view v1 as select * from t1 index t_mv_mv.
Root Cause:
The syntax index t_mv_mv is supported only by the new planner and not by the old planner. During the view creation process, regardless of whether the new or old optimizer is used, the process eventually calls the createView method in Env. In the createView method, the persisted SQL of the view is parsed using the old optimizer's parser. If the parsing fails, an error is thrown.
As a result, if the SQL for creating a view includes syntax supported only by the new optimizer, an error occurs.
Solution:
This PR addresses the issue by removing the parsing check from the createView method in Env. Instead, the check is moved to the respective classes responsible for creating views in the new and old optimizers.
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Check List (For Committer)
Test
Behavior changed:
Does this need documentation?
Release note
None
Check List (For Reviewer who merge this PR)