arrow icon indicating copy to clipboard operation
arrow copied to clipboard

ARROW-17989: [C++][Python] Enable struct_field kernel to accept string field names

Open milesgranger opened this issue 3 years ago • 1 comments

Will close ARROW-17989

Allows using names in pc.struct_field

In [1]: arr = pa.array([{'a': {'b': 1}, 'c': 2}])

In [2]: pc.struct_field(arr, 'c')
Out[2]:
<pyarrow.lib.Int64Array object at 0x7f1442da3d60>
[
  2
]

In [3]: pc.struct_field(arr, '.a.b')
Out[3]:
<pyarrow.lib.Int64Array object at 0x7f14436d0f40>
[
  1
]

# And indices as before...
In [4]: pc.struct_field(arr, [0, 0])
Out[4]:
<pyarrow.lib.Int64Array object at 0x7f14436d0ee0>
[
  1
]

In [5]:

milesgranger avatar Oct 25 '22 09:10 milesgranger

https://issues.apache.org/jira/browse/ARROW-17989

github-actions[bot] avatar Oct 25 '22 11:10 github-actions[bot]

@jorisvandenbossche Can you give this a final review?

pitrou avatar Nov 09 '22 14:11 pitrou

Yes, it looks good to me, mostly waiting on the substrait comments.

jorisvandenbossche avatar Nov 09 '22 14:11 jorisvandenbossche

Ping for another review / comments. :) (Current failures seem unrelated)

milesgranger avatar Nov 22 '22 08:11 milesgranger

(Current failures seem unrelated)

Yes, they are also happening on master it seems

jorisvandenbossche avatar Nov 22 '22 10:11 jorisvandenbossche

Benchmark runs are scheduled for baseline = f769f6b32373fcf5fc2a7a51152b375127ca4af7 and contender = b1110ae377c66bc3b666f9c287afdf4907bb1952. b1110ae377c66bc3b666f9c287afdf4907bb1952 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. Conbench compare runs links: [Finished :arrow_down:0.0% :arrow_up:0.0%] ec2-t3-xlarge-us-east-2 [Failed :arrow_down:0.44% :arrow_up:0.0%] test-mac-arm [Finished :arrow_down:0.54% :arrow_up:0.0%] ursa-i9-9960x [Finished :arrow_down:0.38% :arrow_up:0.03%] ursa-thinkcentre-m75q Buildkite builds: [Finished] b1110ae3 ec2-t3-xlarge-us-east-2 [Finished] b1110ae3 test-mac-arm [Finished] b1110ae3 ursa-i9-9960x [Finished] b1110ae3 ursa-thinkcentre-m75q [Finished] f769f6b3 ec2-t3-xlarge-us-east-2 [Failed] f769f6b3 test-mac-arm [Finished] f769f6b3 ursa-i9-9960x [Finished] f769f6b3 ursa-thinkcentre-m75q Supported benchmarks: ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True test-mac-arm: Supported benchmark langs: C++, Python, R ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

ursabot avatar Nov 24 '22 03:11 ursabot

['Python', 'R'] benchmarks have high level of regressions. ursa-i9-9960x

ursabot avatar Nov 24 '22 03:11 ursabot