-
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 lt, lte, gt, gte, eq, not operators. #1330
Conversation
Conformance comparison report
Number passing in both: 5384 Number failing in both: 434 Number passing in Base (dd43328) but now fail: 0 Number failing in Base (dd43328) but now pass: 0 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## partiql-plugin-impl #1330 +/- ##
======================================================
Coverage 49.27% 49.27%
Complexity 1046 1046
======================================================
Files 166 166
Lines 13395 13395
Branches 2504 2504
======================================================
Hits 6600 6600
Misses 6138 6138
Partials 657 657
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
return if (lhs.isNull || rhs.isNull) { | ||
boolValue(null) | ||
} else { | ||
boolValue(lhs == rhs) | ||
} |
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.
Consider: MISSING = a
where a is a non-missing value, I am not sure if this should return false...
At the moment maybe just add a note to this? Or throw a TypeCheckException for consistency?
/** | ||
* A [DataException] represents an unrecoverable query runtime exception. | ||
*/ | ||
public class DataException(public override val message: String) : RuntimeException() |
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.
Nit. File Name. Also, why is this unrecoverable, i.e., can we catch the exception and return MISSING
in permissive mode?
internal fun Int.asInt8(): Int8Value { | ||
if (this < Byte.MIN_VALUE || Byte.MAX_VALUE < this) { | ||
throw DataException("INT2 out of range: $this") | ||
} | ||
return int8Value(this.toByte()) | ||
} |
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.
Why are those cast needed?
StaticType.TEXT.allTypes + listOf(StaticType.NULL), | ||
StaticType.TEXT.allTypes + listOf(StaticType.NULL) |
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.
Is this because SQL: 99 only support equal / not equal operator for comparison between large object strings?
50d48e2
to
603af2d
Compare
Descriptions
Adds evaluation comparison functions from SQL-99 8.2 Comparison Predicate page 287.
and Code Style Guidelines? [YES/NO]
yes
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.