-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fixes aggregations of attribute references to values of union types #1383
Conversation
Conformance comparison report
Number passing in both: 5384 Number failing in both: 434 Number passing in Base (92cc57a) but now fail: 0 Number failing in Base (92cc57a) but now pass: 0 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1383 +/- ##
=========================================
Coverage 73.14% 73.14%
Complexity 2393 2393
=========================================
Files 247 247
Lines 17623 17623
Branches 3176 3176
=========================================
Hits 12890 12890
Misses 3856 3856
Partials 877 877
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
1a8065e
to
9084f54
Compare
6cac376
to
91443cd
Compare
partiql-planner/src/main/kotlin/org/partiql/planner/internal/transforms/PlanTransform.kt
Outdated
Show resolved
Hide resolved
override fun visitRelOpAggregateCall(node: Rel.Op.Aggregate.Call, ctx: ProblemCallback): org.partiql.plan.Rel.Op.Aggregate.Call { | ||
val agg = when (val agg = node.agg) { | ||
is Agg.Unresolved -> { | ||
val name = agg.identifier.toNormalizedString() |
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.
For error messaging, perhaps we leave the casing "as-is"
partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/PlanTyper.kt
Outdated
Show resolved
Hide resolved
partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/PlanTyper.kt
Outdated
Show resolved
Hide resolved
partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/TypeEnv.kt
Outdated
Show resolved
Hide resolved
0d6769c
to
d767d08
Compare
Relevant Issues
Description
TypeEnv
, we would assert, when looking up an attribute on a value, that the value were aStructType
-- even though it could be a union of StructTypes. Or a union of other types. This PR handles this scenario.Open Questions (Not addressed in this PR)
AVG
return? I've pasted a snippet from SQL:1999 which shows that we are conformant, however, I'm not sold.Other Information
and Code Style Guidelines? YES
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.