Raj Thapar created HIVE-7471:
--------------------------------

             Summary: testing for equality of decimal columns does not work
                 Key: HIVE-7471
                 URL: https://issues.apache.org/jira/browse/HIVE-7471
             Project: Hive
          Issue Type: Bug
          Components: Database/Schema
         Environment: x86_64 x86_64 x86_64 GNU/Linux
            Reporter: Raj Thapar


I am using Hive version 0.11 and am facing following problem,

I have 2 tables: venus_all_min_prices and venus_all_prices. They have a column 
bp_price_paid having type of decimal. When I try to query for equality on this 
column between 2 tables, I don't get any results. However if I use one specific 
value and use 2 conditions against this value (one for each column anded 
together), it does return results. 

ie 
1. venus_all_min_prices.bp_price_paid = venus_all_prices.bp_price_paid does not 
return any values
2. venus_all_min_prices.bp_price_paid = 59.99 and 
venus_all_prices.bp_price_paid = 59.99: returns results

What should I do to make (1) work?

My table definitions are below:

CREATE  TABLE venus_all_min_prices(
  bp_price_paid decimal,
  opr_sty_clr_cd string)
PARTITIONED BY (
  partition_timestamp string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
STORED AS INPUTFORMAT
  'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
  'hdfs://host:8020/user/user/database/temp_data_location/venus_all_min_prices'
TBLPROPERTIES (
  'numPartitions'='1',
  'numFiles'='1',
  'transient_lastDdlTime'='1406040417',
  'numRows'='0',
  'totalSize'='2507',
  'rawDataSize'='0')

CREATE  TABLE venus_all_prices(
  bp_price_paid decimal,
  ord_key bigint,
  oms_ord_ln_key string,
  opr_sty_clr_cd string)
PARTITIONED BY (
  partition_timestamp string)
ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
STORED AS INPUTFORMAT
  'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
  'hdfs://host:8020/user/user/database/temp_data_location/venus_all_prices'
TBLPROPERTIES (
  'numPartitions'='3',
  'numFiles'='11',
  'transient_lastDdlTime'='1405979150',
  'numRows'='0',
  'totalSize'='4845600',
  'rawDataSize'='0')  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to