-
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
Removes SEXP, SYMBOL, and DECIMAL_ARBITRARY from PType and Datum #1633
Conversation
a6b7dd8
to
6d5cb42
Compare
partiql-eval/src/main/kotlin/org/partiql/eval/internal/operator/rel/RelOpExclude.kt
Outdated
Show resolved
Hide resolved
partiql-spi/src/main/kotlin/org/partiql/value/io/PartiQLValueIonReader.kt
Show resolved
Hide resolved
partiql-spi/src/main/kotlin/org/partiql/value/PartiQLValueType.kt
Outdated
Show resolved
Hide resolved
@@ -89,8 +89,8 @@ internal val Fn_PLUS__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__DECIMAL_ARBITRARY = F | |||
name = "plus", | |||
returns = PType.decimal(), | |||
parameters = arrayOf( | |||
@Suppress("DEPRECATION") Parameter("lhs", PType.decimal()), | |||
@Suppress("DEPRECATION") Parameter("rhs", PType.decimal()), | |||
Parameter("lhs", PType.decimal()), |
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.
FN
name var for above uses DECIMAL_ARBITRARY, perhaps needs to get changed?
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.
Eventually, yes. Currently rewriting all of the functions. See #1647
@@ -88,8 +88,8 @@ internal val Fn_LTE__DECIMAL_ARBITRARY_DECIMAL_ARBITRARY__BOOL = Function.static | |||
name = "lte", | |||
returns = PType.bool(), | |||
parameters = arrayOf( | |||
@Suppress("DEPRECATION") Parameter("lhs", PType.decimal()), | |||
@Suppress("DEPRECATION") Parameter("rhs", PType.decimal()), | |||
Parameter("lhs", PType.decimal()), |
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.
Similarly, fn name variable uses DECIMAL_ARB. Perhaps should get changed?
Also applies for
- lt
- gt
- gte
- between
- may have some others, so probably need to do a check on Builtins.kt
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.
See #1633 (comment)
name = "concat", | ||
returns = PType.string(), | ||
returns = PType.character(256), // TODO: Handle length |
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.
Should these TODOs for length be handled in this PR or tracked somewhere else?
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.
The work for this has begun in #1647.
PType.time(6), // TODO: Precision | ||
PType.timez(6), // TODO: Precision | ||
) | ||
|
||
val allTimeStampPType = setOf( | ||
PType.timestamp(6), // TODO: Precision | ||
PType.timestampz(6), // TODO: Precision | ||
) | ||
|
||
val allDateTimePType = allDatePType + allTimePType + allTimeStampPType | ||
|
||
val allCharStringPType = setOf( | ||
PType.character(256), // TODO: Length | ||
PType.varchar(256), // TODO: Length | ||
PType.string(), | ||
PType.clob(Int.MAX_VALUE), // TODO: Length | ||
) | ||
|
||
val allBinaryPType = setOf( | ||
PType.blob(Int.MAX_VALUE), // TODO: Length |
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.
Will these TODOs for precision/length be addressed in this PR or are they tracked in some other issue?
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.
Adds error for DECIMAL_ARBITRARY usage
ce66d34
to
d9715e4
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.
Nice, LGTM. May also want to update the PR title and commit messages to include that DECIMAL_ARBITRARY was removed.
Description
Testing
Follow-ups
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.