rubenada opened a new pull request, #6503:
URL: https://github.com/apache/hive/pull/6503

   ### What changes were proposed in this pull request?
   Improve SEARCH expansion to exploit <> operator.
   SEARCH operator can be used to represent many types of range predicates 
including the inequality operator (<>).
   For example `d_dom <> 10 and d_dom <> 20` can be represented as `SEARCH($9, 
Sarg[(-∞..10), (10..20), (20..+∞)])`.
   Currently, after SEARCH expansion the following expression will be 
generated: `OR(<($9, 10), >($9, 20), AND(>($9, 10), <($9, 20)))`; with the 
proposed change we shall get the original (and simpler) `AND(<>($9, 10), <>($9, 
20))`.
   
   
   ### Why are the changes needed?
   Exploit the inequality operator when expanding ranges to generate simpler 
and slightly more efficient expressions.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Unit test added.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to