JingsongLi commented on a change in pull request #8530:
[FLINK-12611][table-planner-blink] Make time indicator nullable in blink
URL: https://github.com/apache/flink/pull/8530#discussion_r296628730
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/calcite/FlinkTypeFactory.scala
##########
@@ -148,27 +148,27 @@ class FlinkTypeFactory(typeSystem: RelDataTypeSystem)
extends JavaTypeFactoryImp
/**
* Creates a indicator type for processing-time, but with similar
properties as SQL timestamp.
*/
- def createProctimeIndicatorType(): RelDataType = {
+ def createProctimeIndicatorType(isNullable: Boolean): RelDataType = {
val originalType = createFieldTypeFromLogicalType(new TimestampType(3))
- canonize(
- new TimeIndicatorRelDataType(
- getTypeSystem,
- originalType.asInstanceOf[BasicSqlType],
- isEventTime = false)
- )
+ val indicator = new TimeIndicatorRelDataType(
+ getTypeSystem,
+ originalType.asInstanceOf[BasicSqlType],
+ isNullable,
+ isEventTime = false)
+ createTypeWithNullability(indicator, isNullable)
Review comment:
OK, let it be:
```
val originalType = createFieldTypeFromLogicalType(new
TimestampType(isNullable, 3))
canonize(new TimeIndicatorRelDataType(
getTypeSystem,
originalType.asInstanceOf[BasicSqlType],
isNullable,
isEventTime = false))
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services