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 #3033: [FLINK-5256] Extend DataSetSingleRowJoin to suppor...
Date Tue, 17 Jan 2017 14:39:03 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3033#discussion_r96408903
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/MapJoinLeftRunner.scala
---
    @@ -32,6 +33,17 @@ class MapJoinLeftRunner[IN1, IN2, OUT](
         broadcastSet match {
           case Some(singleInput) => function.join(multiInput, singleInput, out)
           case None =>
    +        if (isRowClass(multiInput) && returnType.getTypeClass.equals(classOf[Row]))
{
    +          val inputRow = multiInput.asInstanceOf[Row]
    +          val countNullRecords = returnType.getTotalFields - inputRow.getArity
    +          val nullRecords= new Row(countNullRecords)
    +          function.join(multiInput, nullRecords.asInstanceOf[IN2], out)
    --- End diff --
    
    this only works if the generated join function expects the `singleInput` to be a `Row`.
    
    You enabled nullable inputs for outer joins in the code generator, so the generated join
function should be able to handle `null` input. 


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