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

Merges tag v0.14.8 into v1 #1565

Merged
merged 31 commits into from
Aug 24, 2024
Merged

Conversation

johnedquinn
Copy link
Member

@johnedquinn johnedquinn commented Aug 22, 2024

Description

  • Merges tag v0.14.8 into v1

License Information

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

yliuuuu and others added 29 commits June 26, 2024 10:49
Picks commits from main to include in 0.14.6
… typer (partiql#1551)

* preserve constraint for decimal, string in dynamic typer
@johnedquinn johnedquinn marked this pull request as ready for review August 23, 2024 17:54
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.

Left a few minor comments. Merge looks good otherwise

@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Thank you to all who have contributed!
-->

## [Unreleased]
## [0.14.8]
Copy link
Member

Choose a reason for hiding this comment

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

The v0.14.8 CHANGELOG entry does not match w/ the v0.14.8 branch's CHANGELOG -- https://github.com/partiql/partiql-lang-kotlin/blob/v0.14.8/CHANGELOG.md. Perhaps it's because of a prior merge of main to v1?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch. Somehow that merged cleanly.

Copy link
Member

Choose a reason for hiding this comment

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

Seems like we're also missing some of the CHANGELOG release links for v0.14.6-v0.14.8 -- https://github.com/johnedquinn/partiql-lang-jvm/blob/v1-merge-v0_14_8/CHANGELOG.md?plain=1#L1124-L1125.

@@ -132,6 +146,47 @@ internal class DynamicTyper {
return s to mapping
}

private fun computeDecimal(): CompilerType? {
Copy link
Member

Choose a reason for hiding this comment

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

Wonder if we should preserve the change from Yingtao's comment in commit 873b6c4 (#1554). Basically,

  • Make it clearer that this function is only for computing constrained decimals. So rename to computeConstrainedDecimal.
  • Error when we receive an arbitrary decimal rather than returning null, since that would indicate a bug in the dynamic typer. This function shouldn't be called when we have previously encountered an arbitrary decimal.

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 merged change is still wrong. The supertype of INT, SMALLINT, and DECIMAL(5, 0), according to #1554 is DECIMAL. Though, when computeDecimal is invoked to compute the precision and scale, it throws an error when folding over the types of INT and SMALLINT.

This PR merges the not completely correct code while mitigating the thrown exception. I tried to apply as minimal changes as possible to the merge, but this is one area known to have a bug.

Copy link
Member

Choose a reason for hiding this comment

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

Ok -- then if the merged behavior is misaligned w/ the change in 0.14.8, then we should either

  1. track it in a TODO and tracking issue
  2. or fix it in this PR if it's not too much work

Copy link
Member Author

Choose a reason for hiding this comment

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

Adds DynamicTyper issue link
@johnedquinn johnedquinn merged commit ebc3409 into partiql:v1 Aug 24, 2024
7 checks passed
@johnedquinn johnedquinn deleted the v1-merge-v0_14_8 branch August 24, 2024 03:51
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.

5 participants