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 category for PartiqlShape #535

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Add category for PartiqlShape #535

merged 1 commit into from
Jan 14, 2025

Conversation

jpschorr
Copy link
Contributor

This PR introduces StaticCategory, a parallel to DatumCategory. This aides in type-checking against Datum/DatumCategory.

This forms part of the basis for supporting external Variants.

Cf. #529


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

@jpschorr jpschorr requested review from alancai98 and am357 January 13, 2025 22:55
Copy link

github-actions bot commented Jan 13, 2025

Conformance comparison report

Base (a409335) c9f71ee +/-
% Passing 86.90% 86.90% 0.00%
✅ Passing 5587 5587 0
❌ Failing 842 842 0
🔶 Ignored 0 0 0
Total Tests 6429 6429 0

Number passing in both: 5587

Number failing in both: 842

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

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

Comment on lines 20 to 24
trait TypeSatisfier {
fn satisfies(&self, value: &Value) -> bool;
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: could add some docs for what satisfies means

@@ -742,6 +742,12 @@ pub enum Static {
// TODO Add BitString, ByteString, Blob, Clob, and Graph types
}

pub enum StaticCategory<'a> {
Tuple(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Struct?

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 think we probably actually want this to represent the 'category' of tuple types. Right now, that's just Struct, but may include, e.g., Row in the future.

Similar to how it represents both Bag and List with Sequence.

@jpschorr jpschorr force-pushed the feat-shape-category branch from eafc621 to b74749f Compare January 14, 2025 21:31
@jpschorr jpschorr force-pushed the feat-bindingsname-match branch from 262e930 to cd98d77 Compare January 14, 2025 21:37
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 73.46939% with 13 lines in your changes missing coverage. Please review.

Project coverage is 81.27%. Comparing base (a409335) to head (d9dee1f).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
partiql-value/src/datum.rs 50.00% 10 Missing ⚠️
partiql-eval/src/eval/eval_expr_wrapper.rs 86.36% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   81.29%   81.27%   -0.03%     
==========================================
  Files          90       90              
  Lines       19648    19672      +24     
  Branches    19648    19672      +24     
==========================================
+ Hits        15973    15988      +15     
- Misses       3255     3264       +9     
  Partials      420      420              

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

@jpschorr jpschorr force-pushed the feat-shape-category branch from b74749f to e93ee2e Compare January 14, 2025 21:39
@jpschorr jpschorr requested review from alancai98 and am357 January 14, 2025 21:39
Base automatically changed from feat-bindingsname-match to main January 14, 2025 21:48
@jpschorr jpschorr force-pushed the feat-shape-category branch from e93ee2e to d9dee1f Compare January 14, 2025 21:49
@jpschorr jpschorr merged commit 3647c56 into main Jan 14, 2025
18 of 19 checks passed
@jpschorr jpschorr deleted the feat-shape-category branch January 14, 2025 23:22
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