This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-0.15 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit a99f2b5c5f6f387e1d61ab41dcbc83ff440ef21c Author: Zeno Yang <[email protected]> AuthorDate: Sat Oct 23 16:54:00 2021 +0800 [Cache][Bug] Fix sql_key of getting and updating Cache is inconsistent (#6903) Fix #6735 --- .../src/main/java/org/apache/doris/qe/cache/PartitionCache.java | 4 +++- fe/fe-core/src/main/java/org/apache/doris/qe/cache/SqlCache.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/PartitionCache.java b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/PartitionCache.java index 1ff1fdb..dd2c53b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/PartitionCache.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/PartitionCache.java @@ -130,7 +130,9 @@ public class PartitionCache extends Cache { return; } - InternalService.PUpdateCacheRequest updateRequest = rowBatchBuilder.buildPartitionUpdateRequest(nokeyStmt.toSql()); + String nokeyStmtWithViewStmt = nokeyStmt.toSql() + allViewExpandStmtListStr; + InternalService.PUpdateCacheRequest updateRequest + = rowBatchBuilder.buildPartitionUpdateRequest(nokeyStmtWithViewStmt); if (updateRequest.getValuesCount() > 0) { CacheBeProxy proxy = new CacheBeProxy(); Status status = new Status(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/SqlCache.java b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/SqlCache.java index 9485547..f64312e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/SqlCache.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/SqlCache.java @@ -75,8 +75,9 @@ public class SqlCache extends Cache { return; } + String originStmtWithViewStmt = selectStmt.getOrigStmt().originStmt + allViewExpandStmtListStr; InternalService.PUpdateCacheRequest updateRequest = - rowBatchBuilder.buildSqlUpdateRequest(selectStmt.getOrigStmt().originStmt, latestTable.latestPartitionId, + rowBatchBuilder.buildSqlUpdateRequest(originStmtWithViewStmt, latestTable.latestPartitionId, latestTable.latestVersion, latestTable.latestTime); if (updateRequest.getValuesCount() > 0) { CacheBeProxy proxy = new CacheBeProxy(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
