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

    https://github.com/apache/spark/pull/5383#discussion_r28310316
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/Generate.scala ---
    @@ -56,28 +65,33 @@ case class Generate(
       val boundGenerator = BindReferences.bindReference(generator, 
child.output)
     
       override def execute(): RDD[Row] = {
    +    // boundGenerator.terminate() should be triggered after all of the 
rows in the partition
         if (join) {
           child.execute().mapPartitions { iter =>
    -        val nullValues = Seq.fill(generator.output.size)(Literal(null))
    -        // Used to produce rows with no matches when outer = true.
    -        val outerProjection =
    -          newProjection(child.output ++ nullValues, child.output)
    -
    -        val joinProjection =
    -          newProjection(child.output ++ generatorOutput, child.output ++ 
generatorOutput)
    +        val generatorNullRow = 
Row.fromSeq(Seq.fill[Any](generator.output.size)(null))
             val joinedRow = new JoinedRow
     
             iter.flatMap {row =>
    --- End diff --
    
    BTW, please help adding a space after the `{`.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to