You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/09/24 03:11:28 UTC

[GitHub] [incubator-doris] zenoyang opened a new issue #6735: [Bug] Cache cannot sense the modification of the view

zenoyang opened a new issue #6735:
URL: https://github.com/apache/incubator-doris/issues/6735


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   rebase on branch-0.13
   
   ### What's Wrong?
   
   Modifying the `VIEW` is equivalent to modifying the SQL, but because the SQL string has not changed, the query will hit the cached result before the `VIEW` is modified.
   
   PR: [6687](https://github.com/apache/incubator-doris/pull/6687), by adding `updateTime` to `VIEW` and using `originSql + viewUpdateTime` as the cache key, this problem can be solved, but it is not very good.
   
   ### What You Expected?
   
   > Note: There are two types of views, one is the view created by `create view ...`, which will be saved in the FE metadata. The other is the use of the `WITH` statement in SQL. After the SQL is parsed, a `localView` will be generated, which will not be saved in the metadata.
   
   1. For `localView`, it does not need to be expanded into a statement, because `toSql` method already contains `WITH` statement. (However, there should be a bug in the with content display. When a `UNION` is encountered, the with statement is not displayed. The PR has been fixed)
   2. For normal VIEW, it needs to be converted into a final statement
   3. For the normal VIEW contained in `localView`, the normal VIEW will be expanded in the WITH statement
   
   ### How to Reproduce?
   
   Omit
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman closed issue #6735: [Bug] Cache cannot sense the modification of the view

Posted by GitBox <gi...@apache.org>.
morningman closed issue #6735:
URL: https://github.com/apache/incubator-doris/issues/6735


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org