davidradl commented on code in PR #25418:
URL: https://github.com/apache/flink/pull/25418#discussion_r1800899659
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/ExprCodeGenerator.scala:
##########
@@ -679,13 +679,15 @@ class ExprCodeGenerator(ctx: CodeGeneratorContext,
nullableInput: Boolean)
// casting
case CAST =>
+ val legacyCastEnabled = ctx.tableConfig
+ .get(ExecutionConfigOptions.TABLE_EXEC_LEGACY_CAST_BEHAVIOUR)
+ .isEnabled
generateCast(
ctx,
operands.head,
- resultType,
- nullOnFailure = ctx.tableConfig
- .get(ExecutionConfigOptions.TABLE_EXEC_LEGACY_CAST_BEHAVIOUR)
- .isEnabled)
+ if (legacyCastEnabled) resultType.copy(true) else resultType,
Review Comment:
Ok that makes sense. Shall we label
ExecutionConfigOptions.TABLE_EXEC_LEGACY_CAST_BEHAVIOUR as deprecated in this
fix, so people are dissuaded from using it?
--
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]