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

Updates Datum to use java.time for a sane datetime #1691

Merged
merged 12 commits into from
Jan 7, 2025
Merged

Updates Datum to use java.time for a sane datetime #1691

merged 12 commits into from
Jan 7, 2025

Conversation

RCHowell
Copy link
Member

Description

This PR updates Datum to use java.time.

See #1654

Other Information

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

  • < If YES, which ones and why? >

  • < In addition, please also mention any other alternatives you've considered and the reason they've been discarded >

  • Do your changes comply with the Contributing Guidelines
    and Code Style Guidelines? [YES/NO]

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@RCHowell RCHowell changed the title Updates Datum to use java.time for a sane datetime. Updates Datum to use java.time for a sane datetime Dec 24, 2024
Copy link

github-actions bot commented Dec 24, 2024

CROSS-ENGINE-REPORT ❌

BASE (LEGACY-V0.14.8) TARGET (EVAL-4EFC211) +/-
% Passing 89.67% 94.32% 4.65% ✅
Passing 5287 5561 274 ✅
Failing 609 47 -562 ✅
Ignored 0 288 288 🔶
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: v0.14.8
  • Base Engine: LEGACY
  • Target Commit: 4efc211
  • Target Engine: EVAL

Result Details

  • ❌ REGRESSION DETECTED. See Now Failing/Ignored Tests. ❌
  • Passing in both: 2637
  • Failing in both: 17
  • Ignored in both: 0
  • PASSING in BASE but now FAILING in TARGET: 2
  • PASSING in BASE but now IGNORED in TARGET: 115
  • FAILING in BASE but now PASSING in TARGET: 180
  • IGNORED in BASE but now PASSING in TARGET: 0

Now FAILING Tests ❌

The following 2 test(s) were previously PASSING in BASE but are now FAILING in TARGET:

Click here to see
  1. inPredicateWithTableConstructor, compileOption: PERMISSIVE
  2. notInPredicateWithTableConstructor, compileOption: PERMISSIVE

Now IGNORED Tests ❌

The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.

Now Passing Tests

180 test(s) were previously failing in BASE (LEGACY-V0.14.8) but now pass in TARGET (EVAL-4EFC211). Before merging, confirm they are intended to pass.

The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.

CROSS-COMMIT-REPORT ✅

BASE (EVAL-71E9EE3) TARGET (EVAL-4EFC211) +/-
% Passing 94.56% 94.32% -0.24% ⭕
Passing 5575 5561 -14 ⭕
Failing 47 47 0 ✅
Ignored 274 288 14 🔶
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: 71e9ee3
  • Base Engine: EVAL
  • Target Commit: 4efc211
  • Target Engine: EVAL

Result Details

  • ❌ REGRESSION DETECTED. See Now Failing/Ignored Tests. ❌
  • Passing in both: 5561
  • Failing in both: 47
  • Ignored in both: 274
  • PASSING in BASE but now FAILING in TARGET: 0
  • PASSING in BASE but now IGNORED in TARGET: 14
  • FAILING in BASE but now PASSING in TARGET: 0
  • IGNORED in BASE but now PASSING in TARGET: 0

Now IGNORED Tests ❌

The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.

// calculate second/nanos
val ds = second.bigDecimal
val seconds: Int = ds.toInt()
val nanoOfSecond: Int = ds.remainder(BigDecimal.ONE).movePointRight(9).toInt()
Copy link
Member

Choose a reason for hiding this comment

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

nit: this is used in a few other places. perhaps could be some top-level variable/const?


@Test
@Disabled("The planner does not return the v1 plans right now. See assertExpression.") // TODO
fun testRandomDates() {
Copy link
Member

Choose a reason for hiding this comment

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

Why is this test getting removed?

@@ -18,6 +18,22 @@ STRICT:::divDecimalInt
PERMISSIVE:::subtractionOutOfAllowedPrecision
STRICT:::subtractionOutOfAllowedPrecision

// TODO: Datetime methods for EXTRACT for TIME WITH TIMEZONE and TIMESTAMP WITH TIMEZONE
Copy link
Member

Choose a reason for hiding this comment

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

Are these the conformance tests that were failing w/ this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, some issue introduced with lowering the Ion timestamp.

Copy link
Member

@alancai98 alancai98 Jan 7, 2025

Choose a reason for hiding this comment

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

I'll cut a separate issue to track these new failing conformance tests -- #1699.

@RCHowell RCHowell requested a review from alancai98 January 7, 2025 18:24
import java.util.regex.Matcher
import java.util.regex.Pattern

internal object DateTimeUtils {
Copy link
Member

@alancai98 alancai98 Jan 7, 2025

Choose a reason for hiding this comment

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

(from offline review) this file's logic was kept largely the same as before. We should cleanup the validation + parsing logic -- #1699

@@ -18,6 +18,22 @@ STRICT:::divDecimalInt
PERMISSIVE:::subtractionOutOfAllowedPrecision
STRICT:::subtractionOutOfAllowedPrecision

// TODO: Datetime methods for EXTRACT for TIME WITH TIMEZONE and TIMESTAMP WITH TIMEZONE
Copy link
Member

@alancai98 alancai98 Jan 7, 2025

Choose a reason for hiding this comment

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

I'll cut a separate issue to track these new failing conformance tests -- #1699.

@RCHowell RCHowell merged commit a7eedee into main Jan 7, 2025
14 checks passed
@RCHowell RCHowell deleted the datetime branch January 7, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants