-
Notifications
You must be signed in to change notification settings - Fork 9
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
Type Simple SFW queries using current LogicalPlan
as an IR
#399
Conversation
Conformance comparison report
Number passing in both: 5731 Number failing in both: 612 Number passing in Base (14f6e01) but now fail: 0 Number failing in Base (14f6e01) but now pass: 0 |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #399 +/- ##
==========================================
+ Coverage 81.80% 81.92% +0.11%
==========================================
Files 62 63 +1
Lines 15991 16728 +737
Branches 15991 16728 +737
==========================================
+ Hits 13082 13705 +623
- Misses 2373 2470 +97
- Partials 536 553 +17
☔ View full report in Codecov by Sentry. |
4e5aa56
to
adc220d
Compare
LogicalPlan
as an IR
bcf1f3a
to
1c9bba9
Compare
1c9bba9
to
97b5280
Compare
636cf13
to
6b54416
Compare
6b54416
to
b645dca
Compare
8139cce
to
0cf33db
Compare
0cf33db
to
b1f6084
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few more clarification questions. Otherwise should be ready to approve
12ada2e
to
df1405e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying some things. Looks good and we can always adjust as we implement typing for other binding ops and expressions. Noticed one remaining typo.
Seems like a rustfmt check is still failing: https://github.com/partiql/partiql-lang-rust/actions/runs/6055593593/job/16434699935 |
df73721
to
df1405e
Compare
Should this perhaps use |
The The PartiQL spec 6.3.1 is relevant here: https://partiql.org/assets/PartiQL-Specification.pdf#subsection.6.3 |
That's a good call-out. Another option is to elide the attribute from the schema in permissive mode. As discussed offline will add a TODO in the code and spec. to get back to this later. |
|
I created the following spec. discussion that aims to address this: |
I created the following GitHub discussion that aims to address this: |
I went with the |
Description of changes:
Relates to: partiql/partiql-lang#18
Adds the code for typing a query using the current
LogicalPlan
as anIR
. This PR includes the changes to enable simple SFW queries as the following in bothStrict
andPermissive
typing modes withOpen
andClosed
schemas.Closed schema with
Strict
typing mode.Open schema with
Strict
typing mode andage
non-existent projection.Closed Schema with
Permissive
typing mode andage
non-existent projection.See: partiql/partiql-spec#64
Open Schema with
Strict
typing mode andage
in nested attribute.Open Schema (
customers and details
) withStrict
typing mode.Open Schema (
customers and details
) withStrict
typing mode andage
in nested attribute with Path inFROM
with alias.See: partiql/partiql-spec#65
Closed Schema with
Strict
typing mode withFROM
andProjection
aliases.In addition:
partiql_types
macros, changes the model for some of the types, and adds some helper methods toPartiqlType
.BTreeSet
for constraints andAnyOf
to be able to support ordering on the these types; since we're not expecting large number of elements for these types the performance hit seems negligible.Upon merging this PR we need to add:
Filter
,OrderBy
).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.