TsukiokaKogane commented on code in PR #64776:
URL: https://github.com/apache/doris/pull/64776#discussion_r3518949525


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java:
##########
@@ -258,18 +266,23 @@ private LogicalPlan makeOlapScan(TableIf table, 
UnboundRelation unboundRelation,
                 if (isChangeRead && olapTable.getBaseIndexId() != indexId) {
                     throw new AnalysisException("Change read is not supported 
on non-base index " + indexName.get());
                 }
+                if (unboundRelation.getTableSnapshot().isPresent() && 
olapTable.getBaseIndexId() != indexId) {
+                    throw new AnalysisException("Time travel is not supported 
on non-base index " + indexName.get());
+                }
                 PreAggStatus preAggStatus = 
olapTable.isDupKeysOrMergeOnWrite() ? PreAggStatus.unset()
                         : PreAggStatus.off("For direct index scan on 
mor/agg.");
 
                 scan = new LogicalOlapScan(unboundRelation.getRelationId(),
                     (OlapTable) table, qualifier, tabletIds,
                     CollectionUtils.isEmpty(partIds) ? ((OlapTable) 
table).getPartitionIds() : partIds, indexId,
                     preAggStatus, CollectionUtils.isEmpty(partIds) ? 
ImmutableList.of() : partIds,
-                    unboundRelation.getHints(), 
unboundRelation.getTableSample(), ImmutableList.of());
+                    unboundRelation.getHints(), 
unboundRelation.getTableSample(), ImmutableList.of(),
+                        Optional.ofNullable(unboundRelation.getScanParams()));
             } else {
                 scan = new LogicalOlapScan(unboundRelation.getRelationId(),
                     (OlapTable) table, qualifier, tabletIds, 
unboundRelation.getHints(),
-                    unboundRelation.getTableSample(), ImmutableList.of());
+                    unboundRelation.getTableSample(), ImmutableList.of(),
+                        Optional.ofNullable(unboundRelation.getScanParams()));

Review Comment:
   fixed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to