flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #4111: [FLINK-6896][table] Fix generate PojoType input re...
Date Thu, 15 Jun 2017 10:09:18 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4111#discussion_r122168412
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala
---
    @@ -871,12 +871,24 @@ class CodeGenerator(
           returnType: TypeInformation[_ <: Any],
           resultFieldNames: Seq[String])
         : GeneratedExpression = {
    -    val input1AccessExprs = for (i <- 0 until input1.getArity if input1Mapping.contains(i))
    -      yield generateInputAccess(input1, input1Term, i, input1Mapping)
    +
    +    val input1AccessExprs = if (input1.isInstanceOf[PojoTypeInfo[_]]) {
    +      for (i <- 0 until input1Mapping.length)
    +        yield generateInputAccess(input1, input1Term, i, input1Mapping)
    +    } else {
    +      for (i <- 0 until input1.getArity if input1Mapping.contains(i))
    +        yield generateInputAccess(input1, input1Term, i, input1Mapping)
    +    }
     
         val input2AccessExprs = input2 match {
    -      case Some(ti) => for (i <- 0 until ti.getArity if input2Mapping.contains(i))
    -        yield generateInputAccess(ti, input2Term, i, input2Mapping)
    +      case Some(ti) => if (input2.isInstanceOf[PojoTypeInfo[_]]) {
    --- End diff --
    
    Right, I noticed that as well


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message