Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def __init__(
self._local_scheduling = NodeAffinitySchedulingStrategy(
ray.get_runtime_context().get_node_id(), soft=False
)

# Need this property for lineage tracking
self._source_paths = paths
paths, self._filesystem = _resolve_paths_and_filesystem(paths, filesystem)
filesystem = RetryingPyFileSystem.wrap(
self._filesystem,
Expand Down
2 changes: 2 additions & 0 deletions python/ray/data/datasource/file_based_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ def __init__(
self._partitioning = partitioning
self._ignore_missing_paths = ignore_missing_paths
self._include_paths = include_paths
# Need this property for lineage tracking
self._source_paths = paths
paths, self._filesystem = _resolve_paths_and_filesystem(paths, filesystem)
self._filesystem = RetryingPyFileSystem.wrap(
self._filesystem, retryable_errors=self._data_context.retried_io_errors
Expand Down
1 change: 1 addition & 0 deletions python/ray/data/tests/test_streaming_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ def udf(row):
assert isinstance(logical_ops[0], Read)
datasource = logical_ops[0]._datasource
assert isinstance(datasource, ParquetDatasource)
assert datasource._source_paths == input_path
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Path Comparison Fails Due to Type Mismatch

The new test assertion fails because datasource._source_paths (a string) is compared directly with input_path (a pathlib.Path object). Python does not equate pathlib.Path objects with strings, even for identical paths, leading to a type mismatch.

Fix in Cursor Fix in Web


assert isinstance(logical_ops[1], MapRows)
assert logical_ops[1]._fn == udf
Expand Down