Skip to content
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

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

johnedquinn
Copy link
Member

@johnedquinn johnedquinn commented Oct 28, 2024

Description

  • Removes SEXP, SYMBOL, DECIMAL_ARBITRARY from PType.

Testing

  • All tests passing.
  • For conformance tests, please see the report. The only failing tests are tests that are due to symbol/sexp.

Follow-ups

  • Remove/modify NUMERIC. Do we want to keep NUMERIC as SQL's NUMERIC? We might want to, since it is in the SQL Spec.

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@johnedquinn johnedquinn force-pushed the v1-remove-ion branch 5 times, most recently from a6b7dd8 to 6d5cb42 Compare November 15, 2024 01:58
@johnedquinn johnedquinn marked this pull request as ready for review November 15, 2024 17:23
@@ -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()),
Copy link
Member

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?

Copy link
Member Author

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()),
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name = "concat",
returns = PType.string(),
returns = PType.character(256), // TODO: Handle length
Copy link
Member

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?

Copy link
Member Author

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.

Comment on lines +39 to +58
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
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@alancai98 alancai98 left a 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.

@johnedquinn johnedquinn changed the title Removes sexp and symbol from PType and Datum Removes SEXP, SYMBOL, and DECIMAL_ARBITRARY from PType and Datum Nov 18, 2024
@johnedquinn johnedquinn merged commit 10f93bd into partiql:v1 Nov 18, 2024
7 checks passed
@johnedquinn johnedquinn deleted the v1-remove-ion branch November 18, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants