JingsongLi commented on code in PR #10858:
URL: https://github.com/apache/paimon/pull/10858#discussion_r4407895720
##########
paimon-python/pypaimon/read/table_read.py:
##########
@@ -514,10 +516,7 @@ def to_torch(
):
raise ValueError("batch_size must be a positive int or None")
if batch_format == "row":
- from pypaimon.read.variant_read_type import has_variant_extractions
-
- if (self.output_projection is not None and
self.output_projection.named
- and (not streaming or
has_variant_extractions(self.read_type))):
+ if not streaming and self.output_projection is not None and
self.output_projection.named:
Review Comment:
[P2] Update the existing Torch restriction tests for the new streaming
contract
This intentionally accepts streaming Variant rows, but
named_projection_iterator_test.py::test_variant_iterator_requires_native_and_keeps_torch_restriction
still expects to_torch(..., streaming=True) to raise in all eight parameter
combinations, and
variant_test.py::TestVariantPaimonTable::test_variant_projection_keeps_torch_row_restriction
has the same expectation for ordinary append and Data Evolution tables. I
reproduced these assertion failures locally; Python 3.13 CI on this head
reports these same nine failed test items. Please migrate those existing tests
along with this boundary: retain the eager non-streaming rejection, verify
streaming native success where available, and check native-disabled/unavailable
failure when the streaming dataset is consumed. The added suite passing does
not make the existing standard CI matrix pass.
--
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]