Skip to content
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-18337: [R] Possible undesirable handling of POSIXlt objects #15277

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

paleolimbot
Copy link
Member

Before this PR, an attempt to print an ExtensionScalar would segfault:

> arrow::Scalar$create(arrow::vctrs_extension_array(4))
Scalar
/Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/result.cc:28: ValueOrDie called on an error: NotImplemented: construction from scalar of type numeric(0)
/Users/deweydunnington/Desktop/rscratch/arrow/cpp/src/arrow/array/util.cc:545  VisitTypeInline(*scalar_.type, this)
0   libarrow.1100.0.0.dylib             0x000000014d61dbec _ZN5arrow4util7CerrLog14PrintBackTraceEv + 52
1   libarrow.1100.0.0.dylib             0x000000014d61db68 _ZN5arrow4util7CerrLogD2Ev + 116
2   libarrow.1100.0.0.dylib             0x000000014d61dab4 _ZN5arrow4util7CerrLogD1Ev + 28
3   libarrow.1100.0.0.dylib             0x000000014d61dae0 _ZN5arrow4util7CerrLogD0Ev + 28
4   libarrow.1100.0.0.dylib             0x000000014d61d9a8 _ZN5arrow4util8ArrowLogD2Ev + 96
5   libarrow.1100.0.0.dylib             0x000000014d61d9ec _ZN5arrow4util8ArrowLogD1Ev + 28
6   libarrow.1100.0.0.dylib             0x000000014d30d888 _ZN5arrow8internal14DieWithMessageERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 68
7   libarrow.1100.0.0.dylib             0x000000014d30d900 _ZN5arrow8internal17InvalidValueOrDieERKNS_6StatusE + 76
8   libparquet.1100.0.0.dylib           0x000000010bb250d0 _ZNO5arrow6ResultINSt3__110shared_ptrINS_5ArrayEEEE10ValueOrDieEv + 52
9   libarrow.1100.0.0.dylib             0x000000014d313ff0 _ZNO5arrow6ResultINSt3__110shared_ptrINS_5ArrayEEEEdeEv + 40
10  libarrow.1100.0.0.dylib             0x000000014d313880 _ZNK5arrow6Scalar8ToStringEv + 692
11  arrow.so                            0x0000000103c54fec _arrow_Scalar__ToString + 108

After this PR, we get the result of format(ext_scalar$as_vector()):

arrow::Scalar$create(arrow::vctrs_extension_array(4))
#> Scalar
#> 4

This came up because the some relatively common (ish) R type POSIXlt is now transformed to an extension array by default:

arrow::Scalar$create(as.POSIXlt(Sys.time()))
#> Scalar
#> 2023-01-09 14:55:53

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

Copy link
Member

@thisisnic thisisnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, cheers!

@thisisnic thisisnic merged commit 92b5178 into apache:master Jan 11, 2023
@ursabot
Copy link

ursabot commented Jan 11, 2023

Benchmark runs are scheduled for baseline = 157062d and contender = 92b5178. 92b5178 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️1.08% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.19% ⬆️0.09%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 92b5178e ec2-t3-xlarge-us-east-2
[Finished] 92b5178e test-mac-arm
[Finished] 92b5178e ursa-i9-9960x
[Finished] 92b5178e ursa-thinkcentre-m75q
[Finished] 157062d4 ec2-t3-xlarge-us-east-2
[Finished] 157062d4 test-mac-arm
[Finished] 157062d4 ursa-i9-9960x
[Finished] 157062d4 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants