[ https://issues.apache.org/jira/browse/HIVE-21685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16832603#comment-16832603 ]
Jesus Camacho Rodriguez commented on HIVE-21685: ------------------------------------------------ [~kgyrtkirk], we can do that. I assume what you mean is that now that we translate IN clauses into AND/OR, we would end up simplifying the predicate in any case. The only advantage that I observe, if we keep this logic, is that we may be able to make expressions more compact/simplify them before going into the expressions reducer, which is a more expensive step (probably noticeable only for queries with complex expressions). Nevertheless, do you think it is valuable to push this patch since the fix is obvious, then tackle removal in follow-up? This seemed to be an issue for a while and it will be easier to backport since it does not depend on any other features/fixes. > Wrong simplification in query with multiple IN clauses > ------------------------------------------------------ > > Key: HIVE-21685 > URL: https://issues.apache.org/jira/browse/HIVE-21685 > Project: Hive > Issue Type: Bug > Components: CBO > Reporter: Oliver Draese > Assignee: Jesus Camacho Rodriguez > Priority: Major > Attachments: HIVE-21685.patch, HIVE-21685.patch, HIVE-21685.patch > > > Simple test to reproduce: > {code} > select * from table1 where name IN(‘g’,‘r’) AND name IN(‘a’,‘b’); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)