Babulal created CARBONDATA-2523:
----------------------------------- Summary: 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 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 |