[ https://issues.apache.org/jira/browse/CARBONDATA-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16519993#comment-16519993 ] xubo245 edited comment on CARBONDATA-2523 at 6/22/18 4:08 AM: -------------------------------------------------------------- I test it in local machine and it's works fine {code:java} GROUP BY mv13_table.`test4_name` +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |plan | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |== CarbonData Profiler == Table Scan on mv13_table - total blocklets: 1 - filter: none - pruned by Main DataMap - skipped blocklets: 0 | |== Physical Plan == *HashAggregate(keys=[test4_name#584], functions=[sum(sum_salary#585L)]) +- Exchange hashpartitioning(test4_name#584, 200) +- *HashAggregate(keys=[test4_name#584], functions=[partial_sum(sum_salary#585L)]) +- *BatchedScan CarbonDatasourceHadoopRelation [ Database name :default, Table name :mv13_table, Schema :Some(StructType(StructField(test4_name,StringType,true), StructField(sum_salary,LongType,true))) ] default.mv13_table[test4_name#584,sum_salary#585L]| +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {code} Do you test it in cluster?[~Bjangir] was (Author: xubo245): I test it in local machine and it's works fine {code:java} GROUP BY mv13_table.`test4_name` +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |plan | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |== CarbonData Profiler == Table Scan on mv13_table - total blocklets: 1 - filter: none - pruned by Main DataMap - skipped blocklets: 0 | |== Physical Plan == *HashAggregate(keys=[test4_name#584], functions=[sum(sum_salary#585L)]) +- Exchange hashpartitioning(test4_name#584, 200) +- *HashAggregate(keys=[test4_name#584], functions=[partial_sum(sum_salary#585L)]) +- *BatchedScan CarbonDatasourceHadoopRelation [ Database name :default, Table name :mv13_table, Schema :Some(StructType(StructField(test4_name,StringType,true), StructField(sum_salary,LongType,true))) ] default.mv13_table[test4_name#584,sum_salary#585L]| +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {code} Do you test it in cluster? > MV DataMap not working for Aggregate Queries > -------------------------------------------- > > Key: CARBONDATA-2523 > URL: https://issues.apache.org/jira/browse/CARBONDATA-2523 > Project: CarbonData > Issue Type: Bug > Reporter: Babulal > Assignee: xubo245 > Priority: Major > > Spark Release > Spark2.2.1 > Run Below command in sequence > 0: jdbc:hive2://10.18.222.231:23040> create table test4 ( name string,age int,salary int) stored by 'carbondata'; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (0.331 seconds) > 0: jdbc:hive2://10.18.222.231:23040> insert into test4 select 'babu',12,12; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (14.65 seconds) > 0: jdbc:hive2://10.18.222.231:23040> create datamap mv13 using 'mv' as select name,sum(salary) from test4 group by name; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (0.654 seconds) > 0: jdbc:hive2://10.18.222.231:23040> rebuild datamap mv13; > +---------+--+ > | Result | > +---------+--+ > +---------+--+ > No rows selected (17.072 seconds) > 0: jdbc:hive2://10.18.222.231:23040> explain select name,sum(salary) from test4 group by name; > +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+ > | plan | > +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+ > | == CarbonData Profiler == > Table Scan on test4 > - total blocklets: 1 > - filter: none > - pruned by Main DataMap > - skipped blocklets: 0 > | > | == Physical Plan == > *HashAggregate(keys=[name#888], functions=[sum(cast(salary#890 as bigint))]) > +- Exchange hashpartitioning(name#888, 200) > +- *HashAggregate(keys=[name#888], functions=[partial_sum(cast(salary#890 as bigint))]) > +- *BatchedScan CarbonDatasourceHadoopRelation [ Database name :default, Table name :test4, Schema :Some(StructType(StructField(name,StringType,true), StructField(age,IntegerType,true), StructField(salary,IntegerType,true))) ] default.test4[name#888,salary#890] | > +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--+ > 2 rows selected (0.488 seconds) > 0: jdbc:hive2://10.18.222.231:23040> > > > In Relation Table is fact table not MV DataMap it suppose to be test4_table. -- This message was sent by Atlassian JIRA (v7.6.3#76005) |
Free forum by Nabble | Edit this page |