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

Fix Timestamp Type Parsing Issue. #1284

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Fix Timestamp Type Parsing Issue. #1284

merged 3 commits into from
Dec 8, 2023

Conversation

yliuuuu
Copy link
Contributor

@yliuuuu yliuuuu commented Dec 7, 2023

Relevant Issues

  • [Closes/Related To] N/A

Description

  • Previously the timestamp type would get parsed to a Time Type due to a bug in the parser.
t1 is Timestamp
Expected:
(is_type
    (id t1 (case_insensitive) (unqualified))
    (timestamp_type
        null))
Actual:
(is_type
    (id t1 (case_insensitive) (unqualified))
    (time_type
        null))

Other Information

  • Updated Unreleased Section in CHANGELOG: [YES/NO]

    • Yes.
  • Any backward-incompatible changes? [YES/NO]

    • Yes. Bug fix.
  • Any new external dependencies? [YES/NO]

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

License Information

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

Copy link

github-actions bot commented Dec 7, 2023

Conformance comparison report

Base (6ba5a12) 7e0f454 +/-
% Passing 92.33% 92.33% 0.00%
✅ Passing 5372 5372 0
❌ Failing 446 446 0
🔶 Ignored 0 0 0
Total Tests 5818 5818 0

Number passing in both: 5372

Number failing in both: 446

Number passing in Base (6ba5a12) but now fail: 0

Number failing in Base (6ba5a12) but now pass: 0

@yliuuuu yliuuuu requested a review from johnedquinn December 7, 2023 18:49
Comment on lines +368 to +378
@Test
fun callIsTimestamp() = assertExpression(
"t1 IS TIMESTAMP",
"(is_type (id t1 (case_insensitive) (unqualified)) (timestamp_type null))"
)

@Test
fun callIsTime() = assertExpression(
"t1 IS TIME",
"(is_type (id t1 (case_insensitive) (unqualified)) (time_type null))"
)
Copy link
Member

Choose a reason for hiding this comment

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

Just to avoid potential failures in the future, can you also add the WITH TIME ZONE test to each?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added Tests for Time Zone And Precision.

Copy link
Member

Choose a reason for hiding this comment

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

Did you forget to push? I don't see any changes rn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry the push command failed due to a rebased...

@yliuuuu yliuuuu requested a review from johnedquinn December 8, 2023 18:55
@yliuuuu yliuuuu merged commit 124e87f into main Dec 8, 2023
@yliuuuu yliuuuu deleted the parser-fix branch December 8, 2023 19:10
alancai98 added a commit that referenced this pull request Dec 12, 2023
* Adds support for EXCLUDE in the SqlDialect

* fix typer/transfomrer

* Fix Timestamp Type Parsing Issue. (#1284)

* fix timestamp type parsing issue

* Refactors partiql-tests-runner for multiple engines (#1289)

* Adds int32 and int64 variants of date_add (#1291)

* Adds support for DISTINCT in the Planner

* Fix PlanCompiler output type for DISTINCT + ORDER BY (#1298)

* Fixes scan_indexed and adds PIVOT (#1297)

* Port filter_distinct fix to partiql-eval internal

---------

Co-authored-by: John Ed Quinn <johqunn@amazon.com>
Co-authored-by: Yingtao Liu <yliuuu@amazon.com>
Co-authored-by: yliuuuu <107505258+yliuuuu@users.noreply.github.com>
Co-authored-by: John Ed Quinn <40360967+johnedquinn@users.noreply.github.com>
Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>
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