XiaoHongbo-Hope commented on code in PR #7032:
URL: https://github.com/apache/paimon/pull/7032#discussion_r2688891453


##########
paimon-python/pypaimon/read/table_scan.py:
##########
@@ -66,12 +69,19 @@ def _create_starting_scanner(self) -> 
Optional[StartingScanner]:
                 return EmptyStartingScanner()
             return IncrementalStartingScanner.between_timestamps(self.table, 
self.predicate, self.limit,
                                                                  
start_timestamp, end_timestamp)
-        return FullStartingScanner(self.table, self.predicate, self.limit)
+        elif self.partial_read:
+            return PartialStartingScanner(self.table, self.predicate, 
self.limit)
+        else:
+            return FullStartingScanner(self.table, self.predicate, self.limit)
 
     def with_shard(self, idx_of_this_subtask, number_of_para_subtasks) -> 
'TableScan':
+        self.partial_read = True
+        self.starting_scanner = self._create_starting_scanner()
         self.starting_scanner.with_shard(idx_of_this_subtask, 
number_of_para_subtasks)
         return self

Review Comment:
   If `INCREMENTAL_BETWEEN_TIMESTAMP` is configured, 
`_create_starting_scanner()` returns `IncrementalStartingScanner` which doesn't 
have `with_shard()`. This will cause `AttributeError`.



-- 
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]

Reply via email to