[data] Add orc datasource - #64540
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a concrete DataSourceV2 implementation for ORC files (OrcDatasourceV2) with worker-side stripe chunking. It adds OrcFileChunker, OrcFileReader, OrcScanner, OrcInMemorySizeEstimator, and exposes the public read_orc API. Feedback on the implementation suggests optimizing the file reading loop in OrcFileReader by checking if the row limit has already been reached before opening subsequent files, thereby avoiding unnecessary I/O overhead.
| for path, chunk_metadatas in self._iter_contiguous_path_groups(input_split): | ||
| for table in self._read_path(path, chunk_metadatas): |
There was a problem hiding this comment.
To avoid unnecessary file opens and I/O overhead, we should check if the row limit has already been reached before calling _read_path for subsequent files in the outer loop.
| for path, chunk_metadatas in self._iter_contiguous_path_groups(input_split): | |
| for table in self._read_path(path, chunk_metadatas): | |
| for path, chunk_metadatas in self._iter_contiguous_path_groups(input_split): | |
| if self._limit is not None and rows_read >= self._limit: | |
| return | |
| for table in self._read_path(path, chunk_metadatas): |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
Signed-off-by: yifan.xie <xyfabcd@163.com>
Signed-off-by: yifan.xie <xyfabcd@163.com>
775827b to
82b21bf
Compare
Signed-off-by: yifan.xie <xyfabcd@163.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 4ba3909. Configure here.
| else: | ||
| table = table.select([]) | ||
|
|
||
| table = self._append_synthetic_columns(path, stripe_idx, table) |
There was a problem hiding this comment.
Path filter runs too early
Medium Severity
_read_stripe applies _predicate before _append_synthetic_columns. Filters that reference the synthesized path column (when include_paths=True) see null placeholders first, so matching rows are dropped incorrectly.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4ba3909. Configure here.


Description
Support read orc format
Related issues
Additional information