[CALCITE-7531] Add to BasicSqlType constructor accepting precision, scale and nullability#4947
[CALCITE-7531] Add to BasicSqlType constructor accepting precision, scale and nullability#4947snuyanzin wants to merge 2 commits into
BasicSqlType constructor accepting precision, scale and nullability#4947Conversation
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...
| } | ||
|
|
||
| /** | ||
| * Constructs a type with precision/length and scale. |
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.
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.
There was a problem hiding this comment.
thanks for the feedback, addressed
julianhyde
left a comment
There was a problem hiding this comment.
+1 when javadoc is fixed
… scale and nullability
|



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