gustavodemorais commented on code in PR #29060:
URL: https://github.com/apache/flink/pull/29060#discussion_r3902967247


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala:
##########
@@ -1226,7 +1226,7 @@ object ScalarOperatorGens {
               val tpe = fieldTypes(idx)
               if (element.literal) {
                 ""
-              } else if (tpe.isNullable) {
+              } else if (tpe.isNullable || element.nullTerm != NEVER_NULL) {

Review Comment:
   Can we extract this as a small helper to slightly improve readability? 
   
   ```
   /** True only when codegen proved this statically; a dynamic nullTerm may 
still be null at runtime. */
   def isProvenNonNull: Boolean = nullTerm == NEVER_NULL
   ...
   } else if (tpe.isNullable || !element.isProvenNonNull) {
   ```



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

Reply via email to