flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twalthr <...@git.apache.org>
Subject [GitHub] flink pull request #5040: [FLINK-8104][Table API] fixing ROW type value cons...
Date Wed, 29 Nov 2017 14:49:49 GMT
Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5040#discussion_r153803851
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala
---
    @@ -849,6 +850,36 @@ object ScalarOperators {
         generateUnaryArithmeticOperator(operator, nullCheck, operand.resultType, operand)
       }
     
    +  def generateRow(
    +      codeGenerator: CodeGenerator,
    +      resultType: TypeInformation[_],
    +      elements: Seq[GeneratedExpression])
    +  : GeneratedExpression = {
    +    val rowTerm = codeGenerator.addReusableRow(resultType.getArity, elements.size)
    --- End diff --
    
    Maybe add a check here that validates `resultType.getArity == elements.size`. Otherwise
throw a code generator exception.


---

Mime
View raw message