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

Fix list/bag/tuple deep equality #421

Merged
merged 3 commits into from
Aug 14, 2023
Merged

Fix list/bag/tuple deep equality #421

merged 3 commits into from
Aug 14, 2023

Conversation

alancai98
Copy link
Member

@alancai98 alancai98 commented Aug 8, 2023

Closes #420.

Previously, the NullableEq operator (i.e. =) wasn't performing deep equality on values within lists, bags, and tuples. PR adds the equivalent of the eqg function specified in section 7.1.1 which defines NULLs and MISSINGs as equal.

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

@alancai98 alancai98 self-assigned this Aug 8, 2023
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 98.90% and project coverage change: +0.09% 🎉

Comparison is base (d93dfe7) 82.05% compared to head (d63cf7f) 82.14%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
+ Coverage   82.05%   82.14%   +0.09%     
==========================================
  Files          62       62              
  Lines       15706    15763      +57     
  Branches    15706    15763      +57     
==========================================
+ Hits        12888    12949      +61     
+ Misses       2299     2295       -4     
  Partials      519      519              
Files Changed Coverage Δ
partiql-value/src/list.rs 69.02% <94.11%> (+5.10%) ⬆️
partiql-value/src/lib.rs 96.41% <99.28%> (+0.30%) ⬆️
partiql-eval/src/eval/expr/operators.rs 91.14% <100.00%> (+0.28%) ⬆️
partiql-value/src/bag.rs 74.73% <100.00%> (+0.54%) ⬆️
partiql-value/src/tuple.rs 90.06% <100.00%> (+0.78%) ⬆️

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

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Conformance comparison report

Base (d93dfe7) 47dc657 +/-
% Passing 89.06% 89.31% 0.25%
✅ Passing 5649 5665 16
❌ Failing 694 678 -16
🔶 Ignored 0 0 0
Total Tests 6343 6343 0

Number passing in both: 5649

Number failing in both: 678

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

Number failing in Base (d93dfe7) but now pass: 16

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

Click here to see
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_tuples_different_types_different_order_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_list_different_types_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_list_different_types_with_null_missing_equivalence_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_list_different_types_with_null_missing_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_tuples_different_types_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_bag_different_types_different_order_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_bag_different_types_different_order_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_list_different_types_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_tuples_different_types_different_order_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_tuples_different_types_different_order_with_null_missing_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_tuples_different_types_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_bag_different_types_with_null_missing_different_order_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_list_different_types_with_null_missing_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_list_different_types_with_null_missing_equivalence_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::strict_equal_tuples_different_types_different_order_with_null_missing_true
  • partiql_tests::eval::primitives::operators::operators::nary_operators::nary::permissive_equal_bag_different_types_with_null_missing_different_order_true

@alancai98 alancai98 force-pushed the fix-list-equality branch 3 times, most recently from f4a0fdd to 3d312de Compare August 10, 2023 00:53
@alancai98 alancai98 force-pushed the fix-list-equality branch 2 times, most recently from bf88a0e to 498afb7 Compare August 10, 2023 19:33
@alancai98 alancai98 changed the title Fix list/bag deep equality Fix list/bag/tuple deep equality Aug 10, 2023
@alancai98 alancai98 marked this pull request as ready for review August 10, 2023 21:28
@alancai98 alancai98 merged commit 3efe446 into main Aug 14, 2023
19 checks passed
@alancai98 alancai98 deleted the fix-list-equality branch August 14, 2023 20:35
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.

Equal operator on lists, bags, and tuples incorrect in certain cases
2 participants