You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/07 07:20:30 UTC
[GitHub] [flink] JingsongLi commented on a change in pull request #10775:
[FLINK-15482][hive] Failed to call Hive functions returning decimal type
JingsongLi commented on a change in pull request #10775: [FLINK-15482][hive] Failed to call Hive functions returning decimal type
URL: https://github.com/apache/flink/pull/10775#discussion_r363618108
##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarFunctionCallGen.scala
##########
@@ -79,7 +80,8 @@ class ScalarFunctionCallGen(scalarFunction: ScalarFunction) extends CallGenerato
val boxedResultClass = ExtractionUtils.boxPrimitive(resultClass).asInstanceOf[Class[_]]
val javaTypeTerm = boxedResultClass.getCanonicalName
val resultExternalTypeWithResultClass =
- if (resultExternalType.getLogicalType.supportsOutputConversion(boxedResultClass)) {
+ if (LogicalTypeDataTypeConverter.fromDataTypeToLogicalType(resultExternalType)
Review comment:
Can you add a UDF case like:
```
class MyUdf extends ScalarFunction {
public Object eval(...) {...}
public TypeInformation getResultType() {
return Types.BIG_DECIMAL;
}
}
```
to repeat this bug?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services