Lei Rui created IOTDB-244:
-----------------------------

             Summary: wrong duplicated columns query result
                 Key: IOTDB-244
                 URL: https://issues.apache.org/jira/browse/IOTDB-244
             Project: Apache IoTDB
          Issue Type: Bug
            Reporter: Lei Rui


I use the following sql to insert data, 

 
{code:java}
SET STORAGE GROUP TO root.vehicle.d0 
SET STORAGE GROUP TO root.vehicle.d1
CREATE TIMESERIES root.vehicle.d0.s0 WITH DATATYPE=INT32, ENCODING=RLE
CREATE TIMESERIES root.vehicle.d0.s1 WITH DATATYPE=INT64, ENCODING=RLE
CREATE TIMESERIES root.vehicle.d0.s2 WITH DATATYPE=FLOAT, ENCODING=RLE
CREATE TIMESERIES root.vehicle.d0.s3 WITH DATATYPE=TEXT, ENCODING=PLAIN
CREATE TIMESERIES root.vehicle.d0.s4 WITH DATATYPE=BOOLEAN, ENCODING=PLAIN
CREATE TIMESERIES root.vehicle.d1.s0 WITH DATATYPE=INT32, ENCODING=RLEinsert 
into root.vehicle.d0(timestamp,s0) values(1,101)
insert into root.vehicle.d0(timestamp,s0) values(2,198)
insert into root.vehicle.d0(timestamp,s0) values(100,99)
insert into root.vehicle.d0(timestamp,s0) values(101,99)
insert into root.vehicle.d0(timestamp,s0) values(102,80)
insert into root.vehicle.d0(timestamp,s0) values(103,99)
insert into root.vehicle.d0(timestamp,s0) values(104,90)
insert into root.vehicle.d0(timestamp,s0) values(105,99)
insert into root.vehicle.d0(timestamp,s0) values(106,99)
insert into root.vehicle.d0(timestamp,s0) values(2,10000)
insert into root.vehicle.d0(timestamp,s0) values(50,10000)
insert into root.vehicle.d0(timestamp,s0) values(1000,22222)insert into 
root.vehicle.d0(timestamp,s1) values(1,1101)
insert into root.vehicle.d0(timestamp,s1) values(2,198)
insert into root.vehicle.d0(timestamp,s1) values(100,199)
insert into root.vehicle.d0(timestamp,s1) values(101,199)
insert into root.vehicle.d0(timestamp,s1) values(102,180)
insert into root.vehicle.d0(timestamp,s1) values(103,199)
insert into root.vehicle.d0(timestamp,s1) values(104,190)
insert into root.vehicle.d0(timestamp,s1) values(105,199)
insert into root.vehicle.d0(timestamp,s1) values(2,40000)
insert into root.vehicle.d0(timestamp,s1) values(50,50000)
insert into root.vehicle.d0(timestamp,s1) values(1000,55555)insert into 
root.vehicle.d0(timestamp,s2) values(1000,55555)
insert into root.vehicle.d0(timestamp,s2) values(2,2.22)
insert into root.vehicle.d0(timestamp,s2) values(3,3.33)
insert into root.vehicle.d0(timestamp,s2) values(4,4.44)
insert into root.vehicle.d0(timestamp,s2) values(102,10.00)
insert into root.vehicle.d0(timestamp,s2) values(105,11.11)
insert into root.vehicle.d0(timestamp,s2) values(1000,1000.11)insert into 
root.vehicle.d0(timestamp,s3) values(60,'aaaaa')
insert into root.vehicle.d0(timestamp,s3) values(70,'bbbbb')
insert into root.vehicle.d0(timestamp,s3) values(80,'ccccc')
insert into root.vehicle.d0(timestamp,s3) values(101,'ddddd')
insert into root.vehicle.d0(timestamp,s3) values(102,'fffff')insert into 
root.vehicle.d1(timestamp,s0) values(1,999)
insert into root.vehicle.d1(timestamp,s0) values(1000,888)insert into 
root.vehicle.d0(timestamp,s1) values(2000-01-01T08:00:00+08:00, 100)
insert into root.vehicle.d0(timestamp,s3) values(2000-01-01T08:00:00+08:00, 
'good')insert into root.vehicle.d0(timestamp,s4) values(100, false)
insert into root.vehicle.d0(timestamp,s4) values(100, true)
{code}
and then I query as follows:
{code:java}
IoTDB> select s0,s0,s0,s1 from root.vehicle.d0
+-----------------------------------+------------------+------------------+------------------+------------------+
|                               
Time|root.vehicle.d0.s0|root.vehicle.d0.s0|root.vehicle.d0.s0|root.vehicle.d0.s1|
+-----------------------------------+------------------+------------------+------------------+------------------+
|      1970-01-01T08:00:00.001+08:00|               101|               101|     
          101|               101|
|      1970-01-01T08:00:00.002+08:00|             10000|             10000|     
        10000|             10000|
|      1970-01-01T08:00:00.050+08:00|             10000|             10000|     
        10000|             10000|
|      1970-01-01T08:00:00.100+08:00|                99|                99|     
           99|                99|
|      1970-01-01T08:00:00.101+08:00|                99|                99|     
           99|                99|
|      1970-01-01T08:00:00.102+08:00|                80|                80|     
           80|                80|
|      1970-01-01T08:00:00.103+08:00|                99|                99|     
           99|                99|
|      1970-01-01T08:00:00.104+08:00|                90|                90|     
           90|                90|
|      1970-01-01T08:00:00.105+08:00|                99|                99|     
           99|                99|
|      1970-01-01T08:00:00.106+08:00|                99|                99|     
           99|                99|
|      1970-01-01T08:00:01.000+08:00|             22222|             22222|     
        22222|             22222|
|      2000-01-01T08:00:00.000+08:00|              null|              null|     
         null|              null|
+-----------------------------------+------------------+------------------+------------------+------------------+
Total line number = 12
It costs 0.026s
IoTDB> select s0,s1 from root.vehicle.d0
+-----------------------------------+------------------+------------------+
|                               Time|root.vehicle.d0.s0|root.vehicle.d0.s1|
+-----------------------------------+------------------+------------------+
|      1970-01-01T08:00:00.001+08:00|               101|              1101|
|      1970-01-01T08:00:00.002+08:00|             10000|             40000|
|      1970-01-01T08:00:00.050+08:00|             10000|             50000|
|      1970-01-01T08:00:00.100+08:00|                99|               199|
|      1970-01-01T08:00:00.101+08:00|                99|               199|
|      1970-01-01T08:00:00.102+08:00|                80|               180|
|      1970-01-01T08:00:00.103+08:00|                99|               199|
|      1970-01-01T08:00:00.104+08:00|                90|               190|
|      1970-01-01T08:00:00.105+08:00|                99|               199|
|      1970-01-01T08:00:00.106+08:00|                99|              null|
|      1970-01-01T08:00:01.000+08:00|             22222|             55555|
|      2000-01-01T08:00:00.000+08:00|              null|               100|
+-----------------------------------+------------------+------------------+
{code}
The first query "select s0,s0,s0,s1 from root.vehicle.d0" returns wrong result 
as the root.vehicle.d0.s1 data is not correct.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to