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

Initial conformance tests for graph query #1104

Merged
merged 3 commits into from
May 26, 2023
Merged

Initial conformance tests for graph query #1104

merged 3 commits into from
May 26, 2023

Conversation

vgapeyev
Copy link
Contributor

Adjustments for running graph conformance tests in partiql-tests (as needed for loading external graphs into evaluation environments) and the tests themselves.

The tests come in two variations: unit tests and conformance tests in partiql-tests submodule.

Other Information

  • Updated Unreleased Section in CHANGELOG: NO

    • Not sure; tests are an internal matter?
  • Any backward-incompatible changes? NO

  • Any new external dependencies? NO

License Information

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

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 50.00% and project coverage change: +0.02 🎉

Comparison is base (86e184a) 74.89% compared to head (8fc3240) 74.92%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1104      +/-   ##
============================================
+ Coverage     74.89%   74.92%   +0.02%     
- Complexity     2449     2454       +5     
============================================
  Files           255      255              
  Lines         18959    18961       +2     
  Branches       3456     3457       +1     
============================================
+ Hits          14200    14206       +6     
+ Misses         3691     3690       -1     
+ Partials       1068     1065       -3     
Flag Coverage Δ
CLI 14.53% <ø> (ø)
EXAMPLES 80.44% <ø> (ø)
LANG 79.78% <50.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...otlin/org/partiql/lang/eval/ExprValueExtensions.kt 85.56% <ø> (ø)
...src/main/kotlin/org/partiql/lang/eval/ExprValue.kt 92.15% <50.00%> (-1.23%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented May 25, 2023

Conformance comparison report

Base (86e184a) 470f012 +/-
% Passing 92.17% 92.27% 0.09%
✅ Passing 5206 5368 162
❌ Failing 442 450 8
🔶 Ignored 0 0 0
Total Tests 5648 5818 170

Number passing in both: 5204

Number failing in both: 438

Number passing in Base (86e184a) but now fail: 0

Number failing in Base (86e184a) but now pass: 2

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

Click here to see
  • Example 3 — Union of Heterogenous Relations, compileOption: PERMISSIVE
  • Example 3 — Union of Heterogenous Relations, compileOption: LEGACY

Comment on lines +47 to +53
@ParameterizedTest
@ArgumentsSource(Directionality::class)
fun testDirectionality(qr: Pair<String, String>) {
testGraphQueries(sessionDirectionality, qr)
}

class Directionality : ArgumentsProviderBase() {
Copy link
Member

Choose a reason for hiding this comment

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

Will these tests still remain in partiql-lang-kotlin after partiql/partiql-tests#91 is merged into partiql-tests? Seems like a duplication of tests.

Or perhaps are we waiting for the Kotlin conformance test runner improvements that we spoke about in #1096 before relying just on partiql-tests?

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'll follow your advice here.

For tests that have been previously ported from kotlin to conformance, have originals always been removed? My understanding was that in many cases they remained within the unit tests. I, indeed, feel this can be left to settle until the runner improvements or even some larger re-assessment of unit tests vs conformance tests relationship.

Copy link
Member

Choose a reason for hiding this comment

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

For tests that have been previously ported from kotlin to conformance, have originals always been removed?

Tests that were part of pts were removed (#910). The other tests haven't yet been removed yet (e.g. porting from EvaluatorTestSuite.kt.


Agree with the point that the test runner would need improvements in running the tests and modeling passing/failing tests before we go through with deleting the other tests.

alancai98
alancai98 previously approved these changes May 26, 2023
vgapeyev added a commit to partiql/partiql-tests that referenced this pull request May 26, 2023
Start on conformance tests for graph query.

These conformance tests are ported from some of the unit tests in EvaluatingCompilerGraphMatchTests in partiql-lang-kotlin, partiql/partiql-lang-kotlin#1104
vgapeyev added a commit to partiql/partiql-tests that referenced this pull request May 26, 2023
With partiql-lang-kotlin, 2 of them now suceed and the other fails for a better reason.

These fixes stem from exploring the purported conformance regression in partiql/partiql-lang-kotlin#1104.
(The proximate cause of (wrongly) detecting the regression there was probably that 0007.ion contained two different tests under the same name.)
Accounting for the merge of partiql-tests #91.
@vgapeyev vgapeyev merged commit b2bc51d into main May 26, 2023
vgapeyev added a commit that referenced this pull request Jun 2, 2023
This makes it possible to re-enable 6 tests that were commented out in #1104, because the deduplication of path bindings was not happening.
Interestingly, 2 of those tests initially had wrong outcomes specified, now corrected. (Being a case where the deduplication should not apply.)
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.

4 participants