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

   ### What changes were proposed in this pull request?
   1. Convert adjacent AND `LeafNode`s to a `MultiAndLeafNode`
   2. Concatenate partition name filter in `MultiAndLeafNode`
   
   
   ### Why are the changes needed?
   Match longer index prefix in partition filter to improve performance.
   
   For example, a table has partition key: `a, b, c, d`, and a filter is `a=1 
and b=1 and c=1`, when visit as a binary tree `AND(AND(a=1, b=1), c=1)`, the 
filter is:
   ```sql
   PART_NAME like 'a=1/%' and PART_NAME like '%/b=2/%' and PART_NAME like 
'%/c=3/%'
   ```
   If we combine the adjacent AND conditions, the tree will be `MultiAnd(a=1, 
b=2, c=3)`, and the filte can be:
   ```bash
   PART_NAME like 'a=1/b=2/c=3/%'
   ```
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Add unit tests.
   


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