Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-2742

[MV] Wrong data displayed after MV creation.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 1.4.1
    • None
    • None

    Description

      0: jdbc:hive2://10.18.16.173:23040/default> create table mytest_48 (rownumber int,name string, m1 int) stored by 'carbondata';
      ---------+

      Result 

      ---------+
      ---------+
      No rows selected (1.267 seconds)
      0: jdbc:hive2://10.18.16.173:23040/default> load data inpath 'hdfs://hacluster/tmp/babu/testdata_1.csv' into table mytest_48 ;
      ---------+

      Result 

      ---------+
      ---------–+

       

      0: jdbc:hive2://10.18.16.173:23040/default> show datamap  on table mytest_48;
      ------------------------------------------------------------

      DataMapName  ClassName  Associated Table  DataMap Properties 

      ------------------------------------------------------------
      ------------------------------------------------------------
      No rows selected (0.162 seconds)
      0: jdbc:hive2://10.18.16.173:23040/default>
      0: jdbc:hive2://10.18.16.173:23040/default> select * from mytest_48;
      -------------------------+

      rownumber  name      m1   

      -------------------------+

      1          aaa   1000    
      2          aaa   65000   
      3          aaa   1000000 
      1          ddd   1000    
      2          ddd   65000   
      3          ddd   1000000 

      -------------------------+
      6 rows selected (1.266 seconds)
      0: jdbc:hive2://10.18.16.173:23040/default> create datamap map9 using 'mv' as select sum(m1),name from mytest_48 group by name;
      ---------+

      Result 

      ---------+
      ---------+
      No rows selected (0.82 seconds)
      0: jdbc:hive2://10.18.16.173:23040/default> select sum(m1),name from mytest_48 group by name;
      ---------------

      sum(m1)  name 

      ---------------
      ---------------
      No rows selected (2.615 seconds)

      0: jdbc:hive2://10.18.16.173:23040/default> explain select sum(m1),name from mytest_48 group by name;
      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

                                                                                                                                                                                                                                                        plan                                                                                                                                                                                                                                                  

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

      == CarbonData Profiler ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
      == Physical Plan ==
      *HashAggregate(keys=mytest_48_name#297, functions=sum(sum_m1#296L))
      +- Exchange hashpartitioning(mytest_48_name#297, 200)
         +- *HashAggregate(keys=mytest_48_name#297, functions=partial_sum(sum_m1#296L))
            +- *BatchedScan CarbonDatasourceHadoopRelation [ Database name :babu, Table name :map9_table, Schema :Some(StructType(StructField(sum_m1,LongType,true), StructField(mytest_48_name,StringType,true))) ] babu.map9_tablesum_m1#296L,mytest_48_name#297 

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------–+

       

       

      Data in CSV

      rownumber,name,m1
      1,aaa,1000
      2,aaa,65000
      3,aaa,1000000
      1,ddd,1000
      2,ddd,65000
      3,ddd,1000000

      Attachments

        Activity

          People

            xuchuanyin Chuanyin Xu
            Bjangir Babulal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: