You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/05/09 09:01:38 UTC

[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #35505: GH-35389: [Python] Fix coalesce_keys=False option in join operation

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org