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

Add exclude physical plan compiler impl #1280

Closed

Conversation

alancai98
Copy link
Member

@alancai98 alancai98 commented Dec 2, 2023

Relevant Issues

Description

Adds implementation of EXCLUDE to the plan compiler (different from #1249, which adds EXCLUDE to the EvaluatingCompiler). This PR also migrates more of the partiql-lang APIs to partiql-eval's internal package.

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.

@alancai98 alancai98 marked this pull request as draft December 2, 2023 00:42
Copy link

github-actions bot commented Dec 2, 2023

Conformance comparison report

Base (ff60c72) a8f4472 +/-
% 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 (ff60c72) but now fail: 0

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (partiql-eval@941a760). Click here to learn what that means.

Additional details and impacted files
@@               Coverage Diff               @@
##             partiql-eval    #1280   +/-   ##
===============================================
  Coverage                ?   49.43%           
  Complexity              ?     1047           
===============================================
  Files                   ?      166           
  Lines                   ?    13395           
  Branches                ?     2502           
===============================================
  Hits                    ?     6622           
  Misses                  ?     6109           
  Partials                ?      664           
Flag Coverage Δ
CLI 13.43% <0.00%> (?)
EXAMPLES 80.28% <0.00%> (?)
LANG 54.61% <0.00%> (?)

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.

alancai98 added a commit that referenced this pull request Dec 6, 2023
@alancai98 alancai98 force-pushed the add-exclude-physical-plan-compiler-impl branch from 7a1b73f to c911b86 Compare December 6, 2023 23:46
alancai98 added a commit that referenced this pull request Dec 7, 2023
- comment out subsumption tests (to be added in #1280)
@alancai98 alancai98 force-pushed the add-exclude-physical-plan-compiler-impl branch 3 times, most recently from 665ba54 to 0b46b02 Compare December 8, 2023 01:01
RCHowell pushed a commit that referenced this pull request Dec 8, 2023
- comment out subsumption tests (to be added in #1280)
@alancai98 alancai98 marked this pull request as ready for review December 12, 2023 00:53
@alancai98 alancai98 force-pushed the add-exclude-physical-plan-compiler-impl branch from bba80b4 to c526f37 Compare December 12, 2023 01:06
@@ -117,33 +111,6 @@ class EvaluatingCompilerExcludeTests : EvaluatorTestBase() {
}
>>"""
),
EvaluatorTestCase( // EXCLUDE select star with FROM source list
Copy link
Member Author

Choose a reason for hiding this comment

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

Test was same as above.

tc,
EvaluationSession.standard()
)
// TODO: subsumption tests to be added back in https://github.com/partiql/partiql-lang-kotlin/pull/1280
Copy link
Member Author

Choose a reason for hiding this comment

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

Subsumption tests moved to partiql-eval/src/test/kotlin/org/partiql/lang/eval/internal/exclude/CompiledExcludeExprTest.kt

* If possible, prefer the use of the other methods instead because they might return [ExprValue] instances
* that are better optimized for their specific data type (depending on implementation).
*/
internal fun ionValueToExprValue(value: IonValue): ExprValue {
Copy link
Member Author

Choose a reason for hiding this comment

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

Ported from ExprValue.kt and renamed from ExprValue.of(value) to ionValueToExprValue(value)

import org.partiql.lang.eval.OrdinalBindings
import org.partiql.lang.eval.internal.ext.namedValue

internal class ListExprValue(val values: Sequence<ExprValue>) : BaseExprValue() {
Copy link
Member Author

Choose a reason for hiding this comment

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

These sequence ExprValues were ported from ExprValue.kt. They were internal to partiql-lang. Needed to case on the concrete Java class name in ExcludeRelationalOperatorFactory, so ported to this file in partiql-eval.

@alancai98 alancai98 changed the title [WIP] Add exclude physical plan compiler impl Add exclude physical plan compiler impl Dec 12, 2023
alancai98 added a commit that referenced this pull request Dec 12, 2023
- comment out subsumption tests (to be added in #1280)
- Port over List/Bag/Sexp ExprValue to partiql-eval
- Port over IonValue to ExprValue conversion to partiql-eval
- Change PhysicalPlanCompilerImpl (and other partiql-eval) to use
  internal partiql-eval apis
@alancai98 alancai98 force-pushed the add-exclude-physical-plan-compiler-impl branch from c526f37 to c2ea303 Compare December 12, 2023 23:04
@alancai98
Copy link
Member Author

Will close this PR in favor of adding EXCLUDE to the new evaluator rather than the PhysicalPlanCompiler.

@alancai98 alancai98 closed this Dec 14, 2023
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