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

Generalizes back-tick Ion to a variant pair in the AST #1591

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Generalizes back-tick Ion to a variant pair in the AST #1591

merged 1 commit into from
Sep 23, 2024

Conversation

rchowell
Copy link
Contributor

Relevant Issues

Description

This PR removes eager-parsing of Ion in the AST (ONLY) and introduces the parameterized VARIANT type. I am working on a subsequent PR to remove PartiQLValue from the planner which will eliminate eager-parsing of Ion entirely.

This PR is limited to only the necessary AST changes and does not modify the grammar or other components.

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.

Copy link

CROSS-ENGINE Conformance Report ❌

BASE (LEGACY-A065D59) TARGET (EVAL-A065D59) +/-
% Passing 89.67% 94.20% 4.53% ✅
Passing 5287 5554 267 ✅
Failing 609 75 -534 ✅
Ignored 0 267 267 🔶
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: a065d59
  • Base Engine: LEGACY
  • Target Commit: a065d59
  • Target Engine: EVAL

Result Details

  • ❌ REGRESSION DETECTED. See Now Failing Tests. ❌
  • Passing in both: 5019
  • Failing in both: 74
  • PASSING in BASE but now FAILING in TARGET: 1
  • FAILING in BASE but now PASSING in TARGET: 535

Now Failing Tests ❌

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

Click here to see
  1. MYSQL_SELECT_29, compileOption: LEGACY

Now Passing Tests

535 test(s) were previously failing in BASE (LEGACY-A065D59) but now pass in TARGET (EVAL-A065D59). 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-LEGACY Conformance Report ✅

BASE (LEGACY-7A07D25) TARGET (LEGACY-A065D59) +/-
% Passing 89.67% 89.67% 0.00% ✅
Passing 5287 5287 0 ✅
Failing 609 609 0 ✅
Ignored 0 0 0 ✅
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: 7a07d25
  • Base Engine: LEGACY
  • Target Commit: a065d59
  • Target Engine: LEGACY

Result Details

  • Passing in both: 5287
  • Failing in both: 609
  • PASSING in BASE but now FAILING in TARGET: 0
  • FAILING in BASE but now PASSING in TARGET: 0

CROSS-COMMIT-EVAL Conformance Report ✅

BASE (EVAL-7A07D25) TARGET (EVAL-A065D59) +/-
% Passing 94.20% 94.20% 0.00% ✅
Passing 5554 5554 0 ✅
Failing 75 75 0 ✅
Ignored 267 267 0 ✅
Total Tests 5896 5896 0 ✅

Testing Details

  • Base Commit: 7a07d25
  • Base Engine: EVAL
  • Target Commit: a065d59
  • Target Engine: EVAL

Result Details

  • Passing in both: 5554
  • Failing in both: 75
  • PASSING in BASE but now FAILING in TARGET: 0
  • FAILING in BASE but now PASSING in TARGET: 0

// simplified Ion value writing, as this intentionally omits formatting
val value = node.value.toString()
override fun visitExprVariant(node: Expr.Variant, head: SqlBlock): SqlBlock {
if (node.encoding != "ion") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe having the encoding as an enum is a better option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, however I'm not sure the best way to make it extensible/extendable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking of it like the "content-type" header

Copy link
Contributor

Choose a reason for hiding this comment

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

I see thinking of it same as "content-type" make sense if we are directly working on the serialized payload. But if the node is an in-memory (which can be deserialized from the payload), we may benefit from Enum.

@rchowell rchowell merged commit 3281f43 into v1 Sep 23, 2024
14 checks passed
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