carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kumar vishal (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CARBONDATA-2105) Incorrect result displays after creating data map
Date Sat, 03 Feb 2018 12:54:00 GMT

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

kumar vishal resolved CARBONDATA-2105.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.3.0

> Incorrect result displays after creating data map
> -------------------------------------------------
>
>                 Key: CARBONDATA-2105
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2105
>             Project: CarbonData
>          Issue Type: Bug
>          Components: data-query
>    Affects Versions: 1.3.0
>            Reporter: Vandana Yadav
>            Assignee: anubhav tarar
>            Priority: Major
>             Fix For: 1.3.0
>
>         Attachments: 2000_UniqData.csv
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Incorrect result displays after creating data map
> Steps to Reproduce:
> 1. Create a TAble:
> CREATE TABLE uniqdata(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) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES('DICTIONARY_INCLUDE'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')
> 2. Load Data
> a) LOAD DATA INPATH 'HDFS_URL/BabuStore/Data/uniqdata/2000_UniqData.csv' into table uniqdata
OPTIONS('DELIMITER'=',', 'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')
> b) LOAD DATA INPATH 'HDFS_URL/BabuStore/Data/uniqdata/2000_UniqData.csv' into table uniqdata
OPTIONS('DELIMITER'=',', 'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')
> c) LOAD DATA INPATH 'HDFS_URL/BabuStore/Data/uniqdata/2000_UniqData.csv' into table
uniqdata OPTIONS('DELIMITER'=',', 'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')
> Execute Query:
> a) select avg(cust_id) from uniqdata group by cust_id
> output: 
> | 9460.0 |
> | 9671.0 |
> | 10403.0 |
> | 10725.0 |
> | 10867.0 |
> +---------------+--+
> | avg(cust_id) |
> +---------------+--+
> | 9067.0 |
> | 9901.0 |
> +---------------+--+
> 2,002 rows selected (1.718 seconds)
> b) create data map:
> create datamap uniqdata_agg on table uniqdata using 'preaggregate' as select avg(cust_id)
from uniqdata group by cust_id;
> c) select avg(cust_id) from uniqdata group by cust_id;
> output:
> | NULL |
> | NULL |
> | NULL |
> +---------------+--+
> | avg(cust_id) |
> +---------------+--+
> | NULL |
> | NULL |
> +---------------+--+
> 2,002 rows selected (0.895 seconds)
> Expected result: it should display similar result as before creating datamap.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message