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

resolve nullable type causes a dynamic call #1366

Merged
merged 1 commit into from
Feb 8, 2024
Merged

resolve nullable type causes a dynamic call #1366

merged 1 commit into from
Feb 8, 2024

Conversation

yliuuuu
Copy link
Contributor

@yliuuuu yliuuuu commented Feb 8, 2024

Relevant Issues

  • [Closes/Related To] Issue #XXX

Description

Consider if we have a : StaticType.UnionOf(INT4, NULL)
The query a + a would be routed to a dynamic call, because the buildArgumentPermutations would attempts to match signatures with args INT4, INT4, NULL, INT4, INT4, NULL, NULL, NULL.

See example Plan:

⚬ PartiQLPlan[tag=Plan-36809b3]
   ├──Catalog[name=test, tag=Plan-c9b14412]
   │  └──Symbol[type=union(null, int4), tag=Plan-fdf51022]
   └──Query[tag=Plan-439af0a1]
      └──Rex[type=union(int2, null, int4), tag=Plan-ecb47ef3]
         └──Dynamic[tag=Plan-32394b25]
            ├──Rex[type=union(null, int4), tag=Plan-3b304cd]
            │  └──Global[tag=Plan-b7513a12]
            │     └──Ref[catalog=0, symbol=0, tag=Plan-eaf2e03d]
            ├──Rex[type=union(null, int4), tag=Plan-2be5e6ab]
            │  └──Global[tag=Plan-7faea094]
            │     └──Ref[catalog=0, symbol=0, tag=Plan-664cc400]
            ├──Candidate[tag=Plan-e083537]
            │  └──Fn[signature=PLUS__INT8_INT8__INT8, tag=Plan-440fa4c]
            └──Candidate[tag=Plan-215c0857]
               └──Fn[signature=PLUS__INT32_INT32__INT32, tag=Plan-d4d5c34b]

Other Information

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

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

    • No. Not released.
  • Any new external dependencies? [YES/NO]

    • < If YES, which ones and why? >
    • < In addition, please also mention any other alternatives you've considered and the reason they've been discarded >
      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 Feb 8, 2024

Conformance comparison report

Base (bc24c2f) 9a30c6c +/-
% Passing 92.54% 92.54% 0.00%
✅ Passing 5384 5384 0
❌ Failing 434 434 0
🔶 Ignored 0 0 0
Total Tests 5818 5818 0

Number passing in both: 5384

Number failing in both: 434

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

Number failing in Base (bc24c2f) but now pass: 0

@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bc24c2f) 72.15% compared to head (b02d8e9) 72.15%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1366   +/-   ##
=========================================
  Coverage     72.15%   72.15%           
  Complexity     2095     2095           
=========================================
  Files           221      221           
  Lines         15984    15984           
  Branches       2896     2896           
=========================================
  Hits          11534    11534           
  Misses         3641     3641           
  Partials        809      809           
Flag Coverage Δ
CLI 11.86% <ø> (ø)
EXAMPLES 80.28% <ø> (ø)
LANG 80.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yliuuuu yliuuuu marked this pull request as ready for review February 8, 2024 17:47
@yliuuuu yliuuuu requested a review from RCHowell February 8, 2024 17:47
@yliuuuu yliuuuu merged commit 5e9cd19 into main Feb 8, 2024
10 checks passed
@yliuuuu yliuuuu deleted the nullable-args branch February 8, 2024 19:12
@yliuuuu yliuuuu mentioned this pull request Feb 13, 2024
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.

3 participants