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

    https://github.com/apache/spark/pull/13065#discussion_r88548955
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/GenerateExec.scala ---
    @@ -40,6 +42,10 @@ private[execution] sealed case class LazyIterator(func: 
() => TraversableOnce[In
      * output of each into a new stream of rows.  This operation is similar to 
a `flatMap` in functional
      * programming with one important additional feature, which allows the 
input rows to be joined with
      * their output.
    + *
    + * This operator supports whole stage code generation for generators that 
do not implement
    + * terminate().
    --- End diff --
    
    I don't think this holds. This method implies that the generator holds some 
state, and that calling this on an un-used generator might return the correct 
result.
    
    I have added an explicit `GeneratorWithCodegen` trait which all generators 
must implement if they want to be eligible for code generation. The terminate() 
method in this trait has been closed off.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to