JingsongLi commented on code in PR #6274:
URL: https://github.com/apache/paimon/pull/6274#discussion_r2361967358
##########
paimon-python/pypaimon/read/plan.py:
##########
@@ -26,11 +26,33 @@
@dataclass
class Plan:
"""Implementation of Plan for native Python reading."""
- _files: List[ManifestEntry]
_splits: List[Split]
-
- def files(self) -> List[ManifestEntry]:
- return self._files
+ _plan_start_row: int = None
+ _plan_end_row: int = None
def splits(self) -> List[Split]:
return self._splits
+
+ def plan_start_row(self) -> int:
+ return self._plan_start_row
+
+ def plan_end_row(self) -> int:
+ return self._plan_end_row
+
+ def extract_entries(self) -> List[ManifestEntry]:
+ """Extract ManifestEntry list from _splits variable."""
+ manifest_entries = []
+
+ for split in self._splits:
+ # For each file in the split, create a ManifestEntry
+ for data_file in split.files:
+ manifest_entry = ManifestEntry(
+ kind=0, # 0 indicates ADD operation
+ partition=split.partition,
+ bucket=split.bucket,
+ total_buckets=-1, # Default value, may need to be set
based on table configuration
Review Comment:
Looks not so good. Maybe we need to keep entries, and generate split lazied.
--
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]