-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-11259: [Python] Allow to create field reference to nested field #12863
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you! I left a couple thoughts.
@@ -1376,12 +1376,18 @@ TEST(Expression, SerializationRoundTrips) { | |||
|
|||
ExpectRoundTrips(field_ref("field")); | |||
|
|||
ExpectRoundTrips(field_ref(FieldRef("foo", "bar", "baz"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to spell out field_ref(FieldRef("foo", "bar"))
explicitly or is it possible to simply write field_ref("foo", "bar")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try to simplify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"))); ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @AlenkaF ! Just two minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, will merge if green. Thank you @AlenkaF !
Benchmark runs are scheduled for baseline = 83dda5c and contender = e0668e2. e0668e2 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This PR tries to redo the work from #9799.
It will unblock:
cc @jorisvandenbossche @pitrou