Github user mgaido91 commented on the issue:

    https://github.com/apache/spark/pull/21403
  
    @cloud-fan thank for looking at this. I don't think that "hack" can be 
removed. Let me show an example when I think we cannot avoid that change.
    
    Imagine this query:
    ```
    select 1 from (select (1, 'a') as col1) tab1 where col1 in (select 1, 'a')
    ```
    Without changing the way `In` is built this is equivalent to:
    ```
    select 1 from (select 1 as col1, 'a' as col2) tab1 where (col1, col2) in 
(select 1, 'a')
    ```
    But the first query is invalid, as the outer value has one element an the 
subquery has 2 output fields, while the second query is valid. So the only way 
I found in order to avoid problem like this is changing `In` as done in this PR.


---

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

Reply via email to