[
https://issues.apache.org/jira/browse/HIVE-23364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099966#comment-17099966
]
Zoltan Haindrich commented on HIVE-23364:
-----------------------------------------
yes; I was thinking to also use CAST(_col AS STRING) IS NULL instead of _col IS
NULL
but...as a matter of fact right now I think that it should have been pushed
down that CAST; because that already worked before - I suspect we sometimes
miss the opportunity to push down these kind of things
> Push down null-safe cast-s
> ---------------------------
>
> Key: HIVE-23364
> URL: https://issues.apache.org/jira/browse/HIVE-23364
> Project: Hive
> Issue Type: Improvement
> Reporter: Zoltan Haindrich
> Priority: Major
>
> right now we may endup with conditionals like this:
> {code}
> predicate: CASE WHEN (_col1 is not null) THEN (CASE WHEN
> (_col4 is not null) THEN ((CAST( _col4 AS STRING) = CAST( _col1 AS STRING)))
> ELSE (('EMPTY' = CAST( _col1 AS STRING))) END) ELSE (CASE WHEN (_col4 is not
> null) THEN ((CAST( _col4 AS STRING) = 'EMPTY')) ELSE (('EMPTY' = 'EMPTY'))
> END) END (type: boolean)
> {code}
> if this is after a join operator; then the same CAST might be evaluated for
> the same value...
> in case the CAST is to a type which doesn't widen nullabiltity in Hive - we
> may push down the CAST
--
This message was sent by Atlassian Jira
(v8.3.4#803005)