Github user aokolnychyi commented on the issue:

    https://github.com/apache/spark/pull/23171
  
    As @rxin said, if we introduce a separate expression for the switch-based 
approach, then we will need to modify other places. For example, 
`DataSourceStrategy$translateFilter`. So, integrating into `In` or `InSet` 
seems safer.
    
    I think we can move the switch-based logic to `InSet` and make `InSet` 
responsible for picking the most optimal execution path. We might need to 
modify the condition when we convert `In` to `InSet` as this will most likely 
depend on the underlying data type. I saw noticeable improvements starting from 
5 elements when you compare the if-else approach to the switch-based one. Right 
now, the conversion happens for more than 10 elements.


---

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

Reply via email to