twalthr commented on code in PR #19648:
URL: https://github.com/apache/flink/pull/19648#discussion_r876722784
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/CodeGenUtils.scala:
##########
@@ -342,6 +342,14 @@ object CodeGenUtils {
throw new IllegalArgumentException("Illegal type: " + t)
}
+ def castToPrecisionAndScale(fieldValTerm: String, to: LogicalType, from:
LogicalType): String = {
+ (to, from) match {
+ case (toDec: DecimalType, _: DecimalType) =>
Review Comment:
This is a bit too specific. We should simply cast all arguments to
`arrayType.getElementType` using the `generateCast` method.
--
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]