Skip to content

Commit 0f48a5a

Browse files
committed
[python] file_scanner should use with_shard instead of new interfaces
1 parent 4a884fc commit 0f48a5a

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

paimon-python/pypaimon/read/scanner/file_scanner.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ def __init__(
168168
manifest_scanner: Callable[[], List[ManifestFileMeta]],
169169
predicate: Optional[Predicate] = None,
170170
limit: Optional[int] = None,
171-
vector_search: Optional['VectorSearch'] = None,
172-
shard_index: Optional[int] = None,
173-
shard_count: Optional[int] = None,
174-
bucket_filter: Optional[Callable[[int], bool]] = None
171+
vector_search: Optional['VectorSearch'] = None
175172
):
176173
from pypaimon.table.file_store_table import FileStoreTable
177174

@@ -182,11 +179,6 @@ def __init__(
182179
self.limit = limit
183180
self.vector_search = vector_search
184181

185-
# Bucket-level sharding for parallel consumption
186-
self._shard_index = shard_index
187-
self._shard_count = shard_count
188-
self._bucket_filter = bucket_filter
189-
190182
self.snapshot_manager = SnapshotManager(table)
191183
self.manifest_list_manager = ManifestListManager(table)
192184
self.manifest_file_manager = ManifestFileManager(table)
@@ -422,13 +414,6 @@ def _filter_manifest_entry(self, entry: ManifestEntry) -> bool:
422414
return False
423415
if self.partition_key_predicate and not self.partition_key_predicate.test(entry.partition):
424416
return False
425-
# Apply bucket-level sharding for parallel consumption
426-
if self._shard_index is not None and self._shard_count is not None:
427-
if entry.bucket % self._shard_count != self._shard_index:
428-
return False
429-
elif self._bucket_filter is not None:
430-
if not self._bucket_filter(entry.bucket):
431-
return False
432417
# Get SimpleStatsEvolution for this schema
433418
evolution = self.simple_stats_evolutions.get_or_create(entry.file.schema_id)
434419

0 commit comments

Comments
 (0)