-
Notifications
You must be signed in to change notification settings - Fork 63
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
Adds support for FULL/RIGHT OUTER JOIN and improves performance of JOINs #1295
Conversation
Conformance comparison report
Number passing in both: 5384 Number failing in both: 434 Number passing in Base (dccab37) but now fail: 0 Number failing in Base (dccab37) but now pass: 0 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## partiql-eval #1295 +/- ##
===============================================
Coverage ? 49.28%
Complexity ? 1046
===============================================
Files ? 166
Lines ? 13392
Branches ? 2500
===============================================
Hits ? 6600
Misses ? 6135
Partials ? 657
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
if (previousLhs != null && previousRhs != null) { | ||
previousRhs!!.padNull() | ||
val newRecord = previousLhs!! + previousRhs!! | ||
previousLhs = null | ||
previousRhs = null | ||
return newRecord | ||
} |
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.
What about checking the join condition?
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.
Great catch! Updated and I added a test to use TRUE as the condition.
@@ -471,10 +471,13 @@ public abstract class StructValue<T : PartiQLValue> : PartiQLValue, Sequence<Pai | |||
|
|||
public abstract val fields: Sequence<Pair<String, T>>? |
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 kind of think this should just be a list or array. Array makes more sense honestly because of fixed size rather than an immutable List, but either way not a sequence
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 believe you're tackling this in your PR for modifying PartiQL Value.
} | ||
|
||
@OptIn(PartiQLValueExperimental::class) | ||
abstract fun getOutputRecord(result: Boolean, lhs: Record, rhs: Record): Record? |
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.
Relevant Issues
Description
BagValues
. Before,BagValues
weren't taking into account being unordered, so I grouped and counted the elements for equality. I also needed to updateStructValues
to allow forhashCode
. I essentially delegated the fields of a struct to some private lazily instantiated_fields
variable.Other Information
Updated Unreleased Section in CHANGELOG: NO
Any backward-incompatible changes? NO
Any new external dependencies? NO
Do your changes comply with the Contributing Guidelines
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.