freemandealer commented on code in PR #34615: URL: https://github.com/apache/doris/pull/34615#discussion_r1601018476
########## fe/fe-core/src/main/java/org/apache/doris/common/NereidsSqlCacheManager.java: ########## @@ -253,16 +257,28 @@ private boolean tablesOrDataChanged(Env env, SqlCacheContext sqlCacheContext) { return true; } OlapTable olapTable = (OlapTable) tableIf; - long currentTableTime = olapTable.getVisibleVersionTime(); - long cacheTableTime = scanTable.latestTimestamp; + //long currentTableTime = olapTable.getVisibleVersionTime(); + //long cacheTableTime = scanTable.latestTimestamp; long currentTableVersion = olapTable.getVisibleVersion(); long cacheTableVersion = scanTable.latestVersion; // some partitions have been dropped, or delete or updated or replaced, or insert rows into new partition? - if (currentTableTime > cacheTableTime - || (currentTableTime == cacheTableTime && currentTableVersion > cacheTableVersion)) { + if (currentTableVersion != cacheTableVersion) { return true; } + if (Config.isCloudMode()) { + Collection<Long> partitionIds = scanTable.getScanPartitions(); + List<CloudPartition> partitions = partitionIds.stream() + .sorted() + .map(olapTable::getPartition) + .map(partition -> (CloudPartition) partition) + .collect(Collectors.toList()); + try { + CloudPartition.getSnapshotVisibleVersion(partitions); + } catch (RpcException e) { + throw new RuntimeException(e); + } Review Comment: sure, will do -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org