[ 
https://issues.apache.org/jira/browse/HIVE-23364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099084#comment-17099084
 ] 

Zoltan Haindrich commented on HIVE-23364:
-----------------------------------------

I think this could be done for:
* string casts
* integer type widening

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

Reply via email to