[CALCITE-7531] Add to BasicSqlType constructor accepting precision, scale and nullability#4947
Open
snuyanzin wants to merge 1 commit into
Open
[CALCITE-7531] Add to BasicSqlType constructor accepting precision, scale and nullability#4947snuyanzin wants to merge 1 commit into
BasicSqlType constructor accepting precision, scale and nullability#4947snuyanzin wants to merge 1 commit into
Conversation
|
mihaibudiu
approved these changes
May 15, 2026
Contributor
mihaibudiu
left a comment
There was a problem hiding this comment.
I found it strange not having this API, especially since you actually need an instance of a typeSystem to change the nullability...
julianhyde
reviewed
May 15, 2026
| } | ||
|
|
||
| /** | ||
| * Constructs a type with precision/length and scale. |
Contributor
There was a problem hiding this comment.
The javadoc on this constructor is identical to that on the previous constructor. And it doesn't describe what this constructor does.
Contributor
There was a problem hiding this comment.
Worse than that, the change you have made isn't consistent with the commit message. Sort it out, please.
julianhyde
requested changes
May 15, 2026
Contributor
julianhyde
left a comment
There was a problem hiding this comment.
+1 when javadoc is fixed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Jira Link
CALCITE-7531
Changes Proposed
before Calcite 1.38 it was possible to set nullability with setter
now it is impossible, also it is impossible to pass it via constructor together with precision and scale.
so Flink's code stops working after attempting to bump Calcite.
The PR adds constructor to resolve it
here it is Flink code using this https://github.com/apache/flink/blob/1990310135edfec7021f77e64dbb976100458909/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/schema/TimeIndicatorRelDataType.scala#L30-L38