branch-2.1: [fix](cache) fix mtmv cache can not use test #46537 (#46607)

Cherry-picked from #46537

Co-authored-by: 924060929 <lanhuajian@selectdb.com>
This commit is contained in:
github-actions[bot]
2025-01-08 21:09:53 +08:00
committed by GitHub
parent 4a08d81acf
commit 6a68b09100
2 changed files with 4 additions and 2 deletions

View File

@ -321,7 +321,7 @@ public class NereidsSqlCacheManager {
// check table type and version
for (Entry<FullTableName, TableVersion> scanTable : sqlCacheContext.getUsedTables().entrySet()) {
TableVersion tableVersion = scanTable.getValue();
if (tableVersion.type != TableType.OLAP) {
if (tableVersion.type != TableType.OLAP && tableVersion.type != TableType.MATERIALIZED_VIEW) {
return true;
}
TableIf tableIf = findTableIf(env, scanTable.getKey());