twalthr commented on code in PR #26862:
URL: https://github.com/apache/flink/pull/26862#discussion_r2251239361
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/CodeGenUtils.scala:
##########
@@ -301,7 +301,9 @@ object CodeGenUtils {
// ordered by type root definition
case CHAR | VARCHAR => s"$BINARY_STRING.EMPTY_UTF8"
case BOOLEAN => "false"
- case TINYINT | SMALLINT | INTEGER | DATE | TIME_WITHOUT_TIME_ZONE |
INTERVAL_YEAR_MONTH => "-1"
+ case TINYINT => "((byte)-1)"
Review Comment:
```suggestion
case TINYINT => "((byte) -1)"
```
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/CodeGenUtils.scala:
##########
@@ -301,7 +301,9 @@ object CodeGenUtils {
// ordered by type root definition
case CHAR | VARCHAR => s"$BINARY_STRING.EMPTY_UTF8"
case BOOLEAN => "false"
- case TINYINT | SMALLINT | INTEGER | DATE | TIME_WITHOUT_TIME_ZONE |
INTERVAL_YEAR_MONTH => "-1"
+ case TINYINT => "((byte)-1)"
+ case SMALLINT => "((short)-1)"
Review Comment:
```suggestion
case SMALLINT => "((short) -1)"
```
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/BuiltInFunctionTestBase.java:
##########
@@ -685,4 +753,23 @@ public static ResultSpec resultSpec(
return new ResultSpec(
tableApiExpression, sqlExpression, result, tableApiDataType,
sqlQueryDataType);
}
+
+ /** Identity function that forces the parser to skip constant folding. */
Review Comment:
```suggestion
/** Identity function that forces the planner to skip constant folding.
*/
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]