marsupialtail commented on code in PR #13830:
URL: https://github.com/apache/arrow/pull/13830#discussion_r955344826


##########
python/pyarrow/_dataset.pyx:
##########
@@ -1046,6 +1046,21 @@ cdef class FileFragment(Fragment):
             self.partition_expression
         )
 
+    def slice(self, start, end):
+        """
+        Returns a new FileFragment object that will only read 
+        a slice of the old FileFragment defined by start (start byte)
+        and end (end byte).
+        """
+
+        cdef FileFragment new_fragment = self.format.make_fragment(
+            self.path if self.buffer is None else self.buffer,
+            self.filesystem,
+            self.partition_expression
+        )
+        new_fragment.file_fragment.set_bounds(start, end)

Review Comment:
   Yeah I am going to update this to subslice, where subslicing logic is 
implemented in Python



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

Reply via email to