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

Handles null calls in dynamic dispatch #1436

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Handles null calls in dynamic dispatch #1436

merged 2 commits into from
Apr 23, 2024

Conversation

RCHowell
Copy link
Contributor

@RCHowell RCHowell commented Apr 18, 2024

Description

Handles null calls in dynamic dispatch

Tests Addressed



    OVERLAY mismatched type, compileOption: LEGACY

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE null "}, compileOption: PERMISSIVE

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE null "}, compileOption: LEGACY

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE '[' "}, compileOption: PERMISSIVE

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE '[' "}, compileOption: LEGACY

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE 'S1' ESCAPE null "}, compileOption: PERMISSIVE

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE 'S1' ESCAPE null "}, compileOption: LEGACY

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null "}, compileOption: PERMISSIVE

    null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null "}, compileOption: LEGACY

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 Apr 18, 2024

Conformance comparison report-Cross Engine

Base (legacy) eval +/-
% Passing 92.52% 90.05% -2.48%
✅ Passing 5383 5239 -144
❌ Failing 435 579 144
🔶 Ignored 0 0 0
Total Tests 5818 5818 0
Number passing in both: 5042

Number failing in both: 238

Number passing in legacy engine but fail in eval engine: 341

Number failing in legacy engine but pass in eval engine: 197
⁉️ CONFORMANCE REPORT REGRESSION DETECTED ⁉️
The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.
197 test(s) were failing in legacy but now pass in eval. 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.

Conformance comparison report-Cross Commit-LEGACY

Base (cc05d7f) e52ae93 +/-
% Passing 92.51% 92.52% 0.02%
✅ Passing 5382 5383 1
❌ Failing 436 435 -1
🔶 Ignored 0 0 0
Total Tests 5818 5818 0
Number passing in both: 5382

Number failing in both: 435

Number passing in Base (cc05d7f) but now fail: 0

Number failing in Base (cc05d7f) but now pass: 1
The following test(s) were previously failing but now pass. Before merging, confirm they are intended to pass:

Click here to see
  • MYSQL_SELECT_29, compileOption: LEGACY

Conformance comparison report-Cross Commit-EVAL

Base (cc05d7f) e52ae93 +/-
% Passing 89.91% 90.05% 0.14%
✅ Passing 5231 5239 8
❌ Failing 587 579 -8
🔶 Ignored 0 0 0
Total Tests 5818 5818 0
Number passing in both: 5231

Number failing in both: 579

Number passing in Base (cc05d7f) but now fail: 0

Number failing in Base (cc05d7f) but now pass: 8
The following test(s) were previously failing but now pass. Before merging, confirm they are intended to pass:

Click here to see
  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE null "}, compileOption: PERMISSIVE

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE null "}, compileOption: LEGACY

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE '[' "}, compileOption: PERMISSIVE

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null ESCAPE '[' "}, compileOption: LEGACY

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE 'S1' ESCAPE null "}, compileOption: PERMISSIVE

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE 'S1' ESCAPE null "}, compileOption: LEGACY

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null "}, compileOption: PERMISSIVE

  • null value on any of the 3 inputs returns false{likeExpr:" d.sid LIKE null "}, compileOption: LEGACY

Comment on lines 238 to 253
// Check this candidate
val fnArity = fn.signature.parameters.size
val fnName = fn.signature.name
if (arity == -1) {
arity = fnArity
name = fnName
} else {
if (fnArity != arity) {
error("Dynamic call candidate had different arity than others; found $fnArity but expected $arity")
}
if (fnName != name) {
error("Dynamic call candidate had different name than others; found $fnName but expected $name")
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to perform these checks?

Also, we shouldn't be checking the name this way due to case-insensitive lookup. If we need these checks, then I'd consider making var name maintain a normalized function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, as it's basic one-time input validation. Not strictly necessary if plans come from the internal partiql-planner — but that might not always be where we receive plans from.

Ack on the normalized names.

@RCHowell RCHowell merged commit 7289c9b into v1 Apr 23, 2024
14 checks passed
@RCHowell RCHowell deleted the v1-eval-sexp branch April 23, 2024 21:36
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