HeartSaVioR commented on code in PR #54085:
URL: https://github.com/apache/spark/pull/54085#discussion_r2761865415


##########
python/pyspark/sql/datasource_internal.py:
##########
@@ -144,3 +141,28 @@ def read(
         self, input_partition: SimpleInputPartition  # type: ignore[override]
     ) -> Iterator[Tuple]:
         return self.simple_reader.readBetweenOffsets(input_partition.start, 
input_partition.end)
+
+
+class ReadLimitRegistry:
+    def __init__(self) -> None:
+        self._registry: Dict[str, Type[ReadLimit]] = {}
+        # Register built-in ReadLimit types
+        self.__register(ReadAllAvailable.type_name(), ReadAllAvailable)
+        self.__register(ReadMinRows.type_name(), ReadMinRows)
+        self.__register(ReadMaxRows.type_name(), ReadMaxRows)
+        self.__register(ReadMaxBytes.type_name(), ReadMaxBytes)

Review Comment:
   Ouch nice finding!



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to