Skip to content

Conversation

@dragosmg
Copy link
Contributor

@dragosmg dragosmg commented Mar 14, 2022

  • bindings for lubridate::make_datetime() and lubridate::make_date()
  • bindings for base::ISOdatetime() and base::ISOdate()

@dragosmg dragosmg marked this pull request as ready for review March 14, 2022 15:24
@github-actions
Copy link

Copy link
Member

@jonkeane jonkeane left a comment

Choose a reason for hiding this comment

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

This is looking good. A few comments about structure + tests.

Looking at the docs for these, it looks like our implementation of make_datetime() could also be mapped to base:ISOdate() and base::ISOdatetime()

@dragosmg dragosmg requested a review from jonkeane March 15, 2022 15:35
@dragosmg dragosmg marked this pull request as draft March 15, 2022 15:38
@dragosmg
Copy link
Contributor Author

dragosmg commented Mar 16, 2022

The are some outstanding issues, mostly having to do with the timezone argument:

  1. default values:
  • for ISOdate() the default value is "GMT" which, in fact, is "UTC".
  • for ISOdatetime() the default value is "" (current timezone)
  • for lubridate::make_datetime() the default value is "UTC"
  1. the strptime binding does not support the tz argument - pointing to ARROW-12820 - which is now solved. I have a feeling that issue doesn't actually mean we can now switch on tz support in strptime.

For 1, the solution could be to set the default value for all tz args to "UTC".

@dragosmg dragosmg marked this pull request as ready for review March 16, 2022 14:34
@jonkeane
Copy link
Member

The are some outstanding issues, mostly having to do with the timezone argument:

  1. default values:
    for ISOdate() the default value is "GMT" which, in fact, is "UTC".
    I think this is fine, we can make ours just be "UTC" it's most important to match behavior even if it means our signatures are slightly different.

for ISOdatetime() the default value is "" (current timezone)
This is similar to our other issue with needing to add a TZ in arrow if we have "". Can we leave it as is and will that automagically become fixed when that other ticket is done? Speaking of: what is the status of that other ticket?

for lubridate::make_datetime() the default value is "UTC"
This is ok, right?

  1. the strptime binding does not support the tz argument - pointing to ARROW-12820 - which is now solved. I have a feeling that issue doesn't actually mean we can now switch on tz support in strptime.
    Yes, though for this binding you can actually "just" specify the timezone after you do the strptime, no?

For 1, the solution could be to set the default value for all tz args to "UTC".
Yup!

@dragosmg
Copy link
Contributor Author

Speaking of: what is the status of that other ticket?

Still blocked by the Windows tz database availability issue #12536.

@dragosmg
Copy link
Contributor Author

This is similar to our other issue with needing to add a TZ in arrow if we have "". Can we leave it as is and will that automagically become fixed when that other ticket is done?

Not sure that will automagically be solved since strptime will still not accept a tz argument (and that is the barrier).

@dragosmg
Copy link
Contributor Author

dragosmg commented Mar 21, 2022

Yes, though for this binding you can actually "just" specify the timezone after you do the strptime, no?

Not sure I follow, once x is created, I don't think we can change the value of x$type$timezone (it seems to be locked) without casting.

@dragosmg dragosmg changed the title ARROW-15802 [R] bindings for lubridate::make_datetime() and lubridate::make_date() ARROW-15802 [R] bindings for lubridate::make_datetime() and lubridate::make_date() Mar 21, 2022
Copy link
Member

@jonkeane jonkeane left a comment

Choose a reason for hiding this comment

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

This looks good. Thanks!

@jonkeane jonkeane closed this in de02cfc Mar 21, 2022
@ursabot
Copy link

ursabot commented Mar 21, 2022

Benchmark runs are scheduled for baseline = acda3c6 and contender = de02cfc. de02cfc 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 ⬇️0.38% ⬆️0.0%] test-mac-arm
[Failed ⬇️1.07% ⬆️0.71%] ursa-i9-9960x
[Finished ⬇️0.17% ⬆️0.04%] 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

@dragosmg dragosmg deleted the make_date_datetime branch April 26, 2022 09:32
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