You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2016/06/02 04:01:02 UTC

[jira] [Commented] (HIVE-13806) Extension to folding NOT expressions in CBO

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

Ashutosh Chauhan commented on HIVE-13806:
-----------------------------------------

+1 will likely require updates to other golden files as well.

> Extension to folding NOT expressions in CBO
> -------------------------------------------
>
>                 Key: HIVE-13806
>                 URL: https://issues.apache.org/jira/browse/HIVE-13806
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO
>    Affects Versions: 2.1.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-13806.patch
>
>
> Follow-up of HIVE-13068.
> Extension to folding expressions for NOT.
> Currently, simplification is performed only if NOT is applied on a simple operation (e.g. IS NOT NULL, =, <>, etc.). We should take advantage of NOT distributivity when it is applied on OR/AND operations to try to simplify predicates further.
> Ex. ql/src/test/results/clientpositive/folder_predicate.q.out
> {noformat}
> explain
> SELECT * FROM predicate_fold_tb WHERE not(value IS NOT NULL AND value = 3)
> {noformat}
> Plan:
> {noformat}
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-0 depends on stages: Stage-1
> STAGE PLANS:
>   Stage: Stage-1
>     Map Reduce
>       Map Operator Tree:
>           TableScan
>             alias: predicate_fold_tb
>             Statistics: Num rows: 6 Data size: 7 Basic stats: COMPLETE Column stats: NONE
>             Filter Operator
>               predicate: (not (value is not null and (value = 3))) (type: boolean)
>               Statistics: Num rows: 3 Data size: 3 Basic stats: COMPLETE Column stats: NONE
>               Select Operator
>                 expressions: value (type: int)
>                 outputColumnNames: _col0
>                 Statistics: Num rows: 3 Data size: 3 Basic stats: COMPLETE Column stats: NONE
>                 File Output Operator
>                   compressed: false
>                   Statistics: Num rows: 3 Data size: 3 Basic stats: COMPLETE Column stats: NONE
>                   table:
>                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
>                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
>                       serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
>   Stage: Stage-0
>     Fetch Operator
>       limit: -1
>       Processor Tree:
>         ListSink
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)