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


##########
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:
   This was on my "new scan node" todo list but sadly that list has been 
stalled for a while now.



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