carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Divya Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CARBONDATA-678) Corr function is not working for double datatype.
Date Wed, 25 Jan 2017 09:59:26 GMT

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

Divya Gupta updated CARBONDATA-678:
-----------------------------------
    Affects Version/s: 1.0.0-incubating

> Corr function is not working for double datatype.
> -------------------------------------------------
>
>                 Key: CARBONDATA-678
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-678
>             Project: CarbonData
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 1.0.0-incubating
>         Environment: Spark 1.6
>            Reporter: SWATI RAO
>            Priority: Trivial
>             Fix For: 1.1.0-incubating
>
>         Attachments: 2000_UniqData.csv, 3000_1_UniqData.csv, 4000_UniqData.csv, 5000_UniqData.csv,
6000_UniqData.csv, 7000_UniqData.csv
>
>
> We have created a table uniqdata_h and then we upload data in this table then we perform
select query having data-type double then it displays null value but when we perform select
query with integer or bigint data-type it displays a value.
> "Double" data-type is not working.
> CREATE QUERY :
> 0: jdbc:hive2://localhost:10000> CREATE TABLE uniqdata_h (CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION
string, DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1
decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,INTEGER_COLUMN1
int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',';
> +---------+--+
> | result  |
> +---------+--+
> +---------+--+
> No rows selected (4.249 seconds)
> LOAD 1 :
> 0: jdbc:hive2://localhost:10000> load data local inpath '/opt/Carbon/CarbonData/TestData/Data/uniqdata/2000_UniqData.csv'
into table uniqdata_h;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (1.176 seconds)
> LOAD 2 :
> 0: jdbc:hive2://localhost:10000> load data local inpath '/opt/Carbon/CarbonData/TestData/Data/uniqdata/4000_UniqData.csv'
into table uniqdata_h;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.485 seconds)
> LOAD 3 :
> 0: jdbc:hive2://localhost:10000> load data local inpath '/opt/Carbon/CarbonData/TestData/Data/uniqdata/5000_UniqData.csv'
into table uniqdata_h;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.365 seconds)
> LOAD 4 :
> 0: jdbc:hive2://localhost:10000> load data local inpath '/opt/Carbon/CarbonData/TestData/Data/uniqdata/6000_UniqData.csv'
into table uniqdata_h;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.594 seconds)
> LOAD 5 :
> 0: jdbc:hive2://localhost:10000> load data local inpath '/opt/Carbon/CarbonData/TestData/Data/uniqdata/7000_UniqData.csv'
into table uniqdata_h;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.753 seconds)
> LOAD 6 :
> 0: jdbc:hive2://localhost:10000> load data local inpath '/opt/Carbon/CarbonData/TestData/Data/uniqdata/3000_1_UniqData.csv'
into table uniqdata_h;
> +---------+--+
> | Result  |
> +---------+--+
> +---------+--+
> No rows selected (0.417 seconds)
> SELECT QUERY : double data-type displays NULL value
> 0: jdbc:hive2://localhost:10000> select corr(Double_COLUMN1,Double_COLUMN1)  as a
from uniqdata_h ;
> +-------+--+
> |   a   |
> +-------+--+
> | NULL  |
> +-------+--+
> whereas select query with integer & bigdata type displays some value.
> 0: jdbc:hive2://localhost:10000> select corr(integer_COLUMN1,bigint_COLUMN1)  as a
from uniqdata_h ;
> +---------------------+--+
> |          a          |
> +---------------------+--+
> | 1.0000000000000002  |
> +---------------------+--+
> 1 row selected (0.54 seconds)



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

Mime
View raw message