Skip to content

Fixed TIMESTAMP and TIME truncation #263

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

he-is-harry
Copy link
Contributor

@he-is-harry he-is-harry commented Mar 31, 2025

  • Updated TIMESTAMP and TIME types to truncate milliseconds instead of rounding
  • Changed the regex so that fractions of seconds will be read exactly for TIME, TIMESTAMP, and LONGDATE types
    • The fractions are truncated to nearest millisecond for TIME and TIMESTAMP, and nanosecond for LONGDATE
  • Added some unit tests for truncating DATETIME types
  • Updated integration tests for DFV 4, 5, 6, and 7 types to also be run on DFV 1

Bug: 342310

- Updated TIMESTAMP and TIME types to truncate milliseconds instead of
rounding
- Changed the regex so that fractions of seconds will be read exactly
for TIME, TIMESTAMP, and LONGDATE types
    - The fractions are truncated to nearest millisecond for TIME and
      TIMESTAMP, and nanosecond for LONGDATE
- Added some unit tests for truncating DATETIME types
- Updated integration tests for DFV 4 types to also be run on DFV 1
- Updated the spatial types and boolean integration tests to also
be run on DFV 1 (BINTEXT DFV6 integration tests were updated in
the previous commit)
- Wrote a comment about a BOOLEAN behaviour change in DFV 7, where
the empty string '' will result in null in DFV 7 but in DFV 1 it
results in false
@he-is-harry he-is-harry marked this pull request as ready for review April 2, 2025 20:08
Copy link
Collaborator

@IanMcCurdy IanMcCurdy left a comment

Choose a reason for hiding this comment

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

Change looks good. After you open a bugzilla for the truncation/rounding issue just add the bug number into the commit description

- Removed the comment about the behaviour change in DFV 7 which
affects empty string inputs for BOOLEAN.
    - The behaviour will be clear in the test change for BOOLEAN
    in a separate pull request

Bug: 342310
- Updated the call of setUpTableRemoteDB in the FIXED integration
tests to match with new consolidated setUpTable introduced in
fix TIMESTAMP and TIME commit to simplify the data type integration
tests
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