Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5898#discussion_r183716512
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala
 ---
    @@ -1274,30 +1276,46 @@ abstract class CodeGenerator(
           literalType: TypeInformation[_],
           literalCode: String)
         : GeneratedExpression = {
    +
    +    // mark this expression as a constant literal
    +    generateTerm(literalType, literalCode).copy(literal = true)
    +  }
    +
    +  private[flink] def generateSymbol(enum: Enum[_]): GeneratedExpression = {
    +    GeneratedExpression(
    +      qualifyEnum(enum),
    +      "false",
    +      "",
    +      new GenericTypeInfo(enum.getDeclaringClass))
    +  }
    +
    +  /**
    +    * Generates access to a term (e.g. a field) that does not require 
unboxing logic.
    +    *
    +    * @param fieldType type of field
    +    * @param fieldTerm expression term of field (already unboxed)
    +    * @return internal unboxed field representation
    +    */
    +  private[flink] def generateTerm(
    +      fieldType: TypeInformation[_],
    +      fieldTerm: String)
    +    : GeneratedExpression = {
         val resultTerm = newName("result")
         val nullTerm = newName("isNull")
    --- End diff --
    
    Same is true for `generateNullLiteral()`


---

Reply via email to