jorisvandenbossche commented on code in PR #35505:
URL: https://github.com/apache/arrow/pull/35505#discussion_r1188346037


##########
python/pyarrow/acero.py:
##########
@@ -53,6 +53,13 @@ class InMemoryDataset:
 def _dataset_to_decl(dataset, use_threads=True):
     decl = Declaration("scan", ScanNodeOptions(dataset, 
use_threads=use_threads))
 
+    # Get rid of special dataset columns
+    # "__fragment_index", "__batch_index", "__last_in_fragment", "__filename"
+    projections = [field(f) for f in dataset.schema.names]
+    decl = Declaration.from_sequence(
+        [decl, Declaration("project", ProjectNodeOptions(projections))]
+    )

Review Comment:
   @westonpace do you know if there is an easier way to do this? (there is not 
an option to just turn off adding those fields in the scanner to start with?)



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