lirui-apache commented on a change in pull request #11511: 
[FLINK-16771][table-planner-blink] NPE when filtering by decimal column
URL: https://github.com/apache/flink/pull/11511#discussion_r399010468
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/GenerateUtils.scala
 ##########
 @@ -346,7 +346,11 @@ object GenerateUtils {
         ctx.addReusableMember(fieldDecimal)
         val value = Decimal.fromBigDecimal(
           literalValue.asInstanceOf[JBigDecimal], precision, scale)
-        generateNonNullLiteral(literalType, fieldTerm, value)
+        if (value == null) {
 
 Review comment:
   That won't work because we expect a decimal literal to be a `BigDecimal`. 
But now the value has been casted to a `Decimal `.

----------------------------------------------------------------
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

Reply via email to