ARROW-11259: [Python] Allow to create field reference to nested field#12863
Closed
AlenkaF wants to merge 6 commits intoapache:masterfrom
Closed
ARROW-11259: [Python] Allow to create field reference to nested field#12863AlenkaF wants to merge 6 commits intoapache:masterfrom
AlenkaF wants to merge 6 commits intoapache:masterfrom
Conversation
|
|
lidavidm
reviewed
Apr 12, 2022
Member
lidavidm
left a comment
There was a problem hiding this comment.
LGTM, thank you! I left a couple thoughts.
pitrou
reviewed
Apr 12, 2022
Member
There was a problem hiding this comment.
Do we have to spell out field_ref(FieldRef("foo", "bar")) explicitly or is it possible to simply write field_ref("foo", "bar")?
Member
Author
There was a problem hiding this comment.
Currently it doesn't work, FieldRef("foo", "bar") needs to be spelled out.
Try 1: `field_ref("foo", "bar")`
```
/Users/alenkafrim/repos/arrow/cpp/src/arrow/compute/exec/expression_test.cc:1379:20: error: no matching function for call to 'field_ref'
ExpectRoundTrips(field_ref("foo", "bar", "baz"));
^~~~~~~~~
/Users/alenkafrim/repos/arrow/cpp/src/arrow/compute/exec/expression.h:152:12: note: candidate function not viable: requires single argument 'ref', but 3 arguments were provided
Expression field_ref(FieldRef ref);
```
Try 2: `field_ref(("foo", "bar"))`
```
/Users/alenkafrim/repos/arrow/cpp/src/arrow/compute/exec/expression_test.cc:1379:31: warning: expression result unused [-Wunused-value]
ExpectRoundTrips(field_ref(("foo", "bar", "baz")));
```
Member
Author
lidavidm
approved these changes
Apr 14, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR tries to redo the work from #9799.
It will unblock:
cc @jorisvandenbossche @pitrou