[ 
https://issues.apache.org/jira/browse/HIVE-11494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prasanth Jayachandran updated HIVE-11494:
-----------------------------------------
    Description: 
Check the predicates in filter expression for following queries. It looks 
closely related to HIVE-11477 and HIVE-11493
{code:title=explain select * from orc_ppd where f = -0.07999999821186066;}
OK
Stage-0
   Fetch Operator
      limit:-1
      Select Operator [SEL_2]
         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
         Filter Operator [FIL_4]
            predicate:(f = -0.07999999821186066) (type: boolean)
            TableScan [TS_0]
               alias:orc_ppd
{code}

{code:title=explain select * from orc_ppd where f = 0.07999999821186066;}
OK
Stage-0
   Fetch Operator
      limit:-1
      Select Operator [SEL_2]
         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
         Filter Operator [FIL_4]
            predicate:(f = 0.08) (type: boolean)
            TableScan [TS_0]
               alias:orc_ppd
{code}

Negative strings constants gets rounded off.
{code:title=explain select * from orc_ppd where f = "-0.07999999821186066";}
OK
Stage-0
   Fetch Operator
      limit:-1
      Select Operator [SEL_2]
         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
         Filter Operator [FIL_4]
            predicate:(f = -0.08) (type: boolean)
            TableScan [TS_0]
               alias:orc_ppd
{code}

  was:
Check the predicates in filter expression for following queries. It looks 
closely related to HIVE-11477 and HIVE-11493
{code:title=explain select * from orc_ppd where f = -0.07999999821186066;}
OK
Stage-0
   Fetch Operator
      limit:-1
      Select Operator [SEL_2]
         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
         Filter Operator [FIL_4]
            predicate:(f = -0.07999999821186066) (type: boolean)
            TableScan [TS_0]
               alias:orc_ppd
{code}

{code:title=explain select * from orc_ppd where f = 0.07999999821186066;}
OK
Stage-0
   Fetch Operator
      limit:-1
      Select Operator [SEL_2]
         
outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
         Filter Operator [FIL_4]
            predicate:(f = 0.08) (type: boolean)
            TableScan [TS_0]
               alias:orc_ppd
{code}


> Some positive constant double predicates gets rounded off while negative 
> constants are not
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-11494
>                 URL: https://issues.apache.org/jira/browse/HIVE-11494
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Pengcheng Xiong
>            Priority: Critical
>
> Check the predicates in filter expression for following queries. It looks 
> closely related to HIVE-11477 and HIVE-11493
> {code:title=explain select * from orc_ppd where f = -0.07999999821186066;}
> OK
> Stage-0
>    Fetch Operator
>       limit:-1
>       Select Operator [SEL_2]
>          
> outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
>          Filter Operator [FIL_4]
>             predicate:(f = -0.07999999821186066) (type: boolean)
>             TableScan [TS_0]
>                alias:orc_ppd
> {code}
> {code:title=explain select * from orc_ppd where f = 0.07999999821186066;}
> OK
> Stage-0
>    Fetch Operator
>       limit:-1
>       Select Operator [SEL_2]
>          
> outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
>          Filter Operator [FIL_4]
>             predicate:(f = 0.08) (type: boolean)
>             TableScan [TS_0]
>                alias:orc_ppd
> {code}
> Negative strings constants gets rounded off.
> {code:title=explain select * from orc_ppd where f = "-0.07999999821186066";}
> OK
> Stage-0
>    Fetch Operator
>       limit:-1
>       Select Operator [SEL_2]
>          
> outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"]
>          Filter Operator [FIL_4]
>             predicate:(f = -0.08) (type: boolean)
>             TableScan [TS_0]
>                alias:orc_ppd
> {code}



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

Reply via email to