[ https://issues.apache.org/jira/browse/CARBONDATA-1757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kunal Kapoor reassigned CARBONDATA-1757: ---------------------------------------- Assignee: Kunal Kapoor > Carbon 1.3.0- Pre_aggregate: After creating datamap on parent table, avg is not correct. > ---------------------------------------------------------------------------------------- > > Key: CARBONDATA-1757 > URL: https://issues.apache.org/jira/browse/CARBONDATA-1757 > Project: CarbonData > Issue Type: Bug > Components: data-query > Affects Versions: 1.3.0 > Reporter: Ayushi Sharma > Assignee: Kunal Kapoor > Labels: functional > > Steps: > 1. create table cust_2 (c_custkey int, c_name string, c_address string, c_nationkey bigint, c_phone string,c_acctbal decimal, c_mktsegment string, c_comment string) STORED BY 'org.apache.carbondata.format'; > 2. load data inpath 'hdfs://hacluster/customer/customer3.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer3.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer4.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer5.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer6.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer7.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer8.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer9.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer10.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer11.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer12.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer13.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > load data inpath 'hdfs://hacluster/customer/customer14.csv' into table cust_2 options('DELIMITER'='|','QUOTECHAR'='"','FILEHEADER'='c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment'); > 3. SELECT c_custkey, c_name, sum(c_acctbal), avg(c_acctbal) FROM cust_2 GROUP BY c_custkey, c_name; > 4. set carbon.input.segments.default.cust_2=0,1; > 5. SELECT c_custkey, c_name, sum(c_acctbal), avg(c_acctbal) FROM cust_2 GROUP BY c_custkey, c_name; > 6. CREATE DATAMAP tt1 ON TABLE cust_2 USING "org.apache.carbondata.datamap.AggregateDataMapHandler" AS SELECT c_custkey, c_name, sum(c_acctbal), avg(c_acctbal) FROM cust_2 GROUP BY c_custkey, c_name; > 7. SELECT c_custkey, c_name, sum(c_acctbal), avg(c_acctbal) FROM cust_2 GROUP BY c_custkey, c_name; > 8. set carbon.input.segments.default.cust_2=*; > 9. SELECT c_custkey, c_name, sum(c_acctbal), avg(c_acctbal) FROM cust_2 GROUP BY c_custkey, c_name; > Issue: > After creating datamap, avg is not correct > Expected Output: > Avg should have been displayed correctly. -- This message was sent by Atlassian JIRA (v6.4.14#64029) |
Free forum by Nabble | Edit this page |