Github user dilipbiswal commented on the pull request:

    https://github.com/apache/spark/pull/11596#issuecomment-194130778
  
    @cloud-fan Thank you.
    1. Can any Generate operator be converted to a LATERAL VIEW? Does the plan 
tree have to match some kind of pattern?
    
    Yes, based on the tests i have tried. I am testing this more to see if i 
uncover any issue. Now i am converting
    ```SQL
    select explode(array(1,2,3)) from t1
    ``` 
    to
    ```SQL
    select tablequalifier.colname from t1 LATERAL VIEW explode(array(1,2,3)) 
tablequalifier as colname
    ``` 
    2. Can any Generate operator be converted to a "SELECT ...udtf..." format?
    
    No. As we have a restriction of allowing one generate in a projection list. 
Thats why we try to
    use the LATERAL VIEW clause.


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