[ https://issues.apache.org/jira/browse/HIVE-24817?focusedWorklogId=571617&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-571617 ]
ASF GitHub Bot logged work on HIVE-24817: ----------------------------------------- Author: ASF GitHub Bot Created on: 25/Mar/21 03:28 Start Date: 25/Mar/21 03:28 Worklog Time Spent: 10m Work Description: jcamachor commented on a change in pull request #2027: URL: https://github.com/apache/hive/pull/2027#discussion_r601016092 ########## File path: ql/src/test/results/clientpositive/llap/compare_cols_null.q.out ########## @@ -34,8 +34,9 @@ STAGE PLANS: Processor Tree: TableScan alias: ccn_table + filterExpr: (key > '123a') (type: boolean) Filter Operator - predicate: false (type: boolean) + predicate: (key > '123a') (type: boolean) Review comment: @dengzhhu653 , that's a great point. The path moving forward should be to fold/optimize this type of expressions in the optimizer (Calcite) rather than in `TypeCheckProcFactory.java`. It seems we have a gap in the optimization logic, that's why it's not getting folded. @scarlin-cloudera , could you create a follow-up JIRA to fix this? -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 571617) Time Spent: 2.5h (was: 2h 20m) > "not in" clause returns incorrect data when there is coercion > ------------------------------------------------------------- > > Key: HIVE-24817 > URL: https://issues.apache.org/jira/browse/HIVE-24817 > Project: Hive > Issue Type: Bug > Components: CBO > Reporter: Steve Carlin > Priority: Major > Labels: pull-request-available > Time Spent: 2.5h > Remaining Estimate: 0h > > When the query has a where clause that has an integer column checking against > being "not in" a decimal column, the decimal column is being changed to null, > causing incorrect results. > This is a sample query of a failure: > select count(*) from my_tbl where int_col not in (355.8); > Since the int_col can never be 355.8, one would expect all the rows to be > returned, but it is changing the 355.8 into a null value causing no rows to > be returned. -- This message was sent by Atlassian Jira (v8.3.4#803005)