Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Queries to execute:
- drop table if exists partitionTable;
- create table partitionTable (id int,name String) partitioned by(email string) stored as carbondata;
- insert into partitionTable select 1,'blue','abc';
- CREATE INDEX maintable_si112 on table partitionTable (name) as 'carbondata';
- alter table partitionTable add partition (email='def') location '$sdkWritePath';
- select *from partitionTable where name = 'red'; ---> returns empty result
- select *from partitionTable where ni(name = 'red');
- alter table partitionTable compact 'major';
- select *from partitionTable where name = 'red';
spark-sql> create table partitionTable (id int,name String) partitioned by(email string) STORED AS carbondata;
Time taken: 1.962 seconds
spark-sql> CREATE INDEX maintable_si112 on table partitionTable (name) as 'carbondata';
Time taken: 2.759 seconds
spark-sql> insert into partitionTable select 1,'huawei','abc';
0
Time taken: 5.808 seconds, Fetched 1 row(s)
spark-sql> alter table partitionTable add partition (email='def') location 'hdfs://hacluster/datastore';
Time taken: 1.108 seconds
spark-sql> insert into partitionTable select 1,'huawei','def';
1
Time taken: 2.707 seconds, Fetched 1 row(s)
spark-sql> select *from partitionTable where name='huawei';
1 huawei abc
Time taken: 0.75 seconds, Fetched 1 row(s)
spark-sql> select *from partitionTable where ni(name='huawei');
1 huawei def
1 huawei abc
Time taken: 0.507 seconds, Fetched 2 row(s)
spark-sql>