Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.2
-
None
Description
测试版本:iotdb master 0528_84780e2
向别名序列 import csv 数据,没有报错信息,但是import 失败。
drop database root.db;
create database root.db;
create aligned timeseries root.db.t1(s_0 DOUBLE compressor=SNAPPY ,s_1 DOUBLE ENCODING=RLE compressor=LZ4 ,s_2 DOUBLE ENCODING=TS_2DIFF compressor=GZIP,s_3 DOUBLE ENCODING=GORILLA compressor=ZSTD,s_4 DOUBLE compressor=ZSTD,s_5 DOUBLE ENCODING=CHIMP compressor=UNCOMPRESSED,s_6 DOUBLE compressor=LZ4,s_7 DOUBLE compressor=GZIP,s_8 DOUBLE compressor=ZSTD,s_9 DOUBLE compressor=ZSTD,s_10 DOUBLE compressor=SNAPPY,s_11 DOUBLE compressor=UNCOMPRESSED);
insert into root.db.t1(time,s_0,s_1,s_2,s_3,s_4,s_5,s_6,s_7,s_8,s_9,s_10,s_11)aligned values(1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1);
insert into root.db.t1(time,s_0,s_1,s_2,s_3,s_4,s_5,s_6,s_7,s_8,s_9,s_10,s_11)aligned values(2,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1);
insert into root.db.t1(time,s_0,s_1,s_2,s_3,s_4,s_5,s_6,s_7,s_8,s_9,s_10,s_11)aligned values(3,3.1,3.1,3.1,3.1,3.1,3.1,3.1,3.1,3.1,3.1,3.1,3.1);
insert into root.db.t1(time,s_0,s_1,s_2,s_3,s_4,s_5,s_6,s_7,s_8,s_9,s_10,s_11)aligned values(4,4.1,4.1,4.1,4.1,4.1,4.1,4.1,4.1,4.1,4.1,4.1,4.1);
create view root.db.view1.col0,root.db.view1.col1 as select s_0,s_1 from root.db.t1;
select col0,col1 from root.db.view1; // 4条记录
tools/export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -td ./ -q "select col0,col1 from root.db.view1;" //导出成功
cat dump0_0.csv
Time,root.db.view1.col0,root.db.view1.col1
1970-01-01T08:00:00.001+08:00,1.1,1.1
1970-01-01T08:00:00.002+08:00,2.1,2.1
1970-01-01T08:00:00.003+08:00,3.1,3.1
1970-01-01T08:00:00.004+08:00,4.1,4.1
删除数据,对别名序列import csv数据
./sbin/start-cli.sh -e "delete from root.db.**;"
./sbin/start-cli.sh -e "select * from root.db.**"
可以看到查询出来的是空结果集
tools/import-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -f dump0_0.csv -fd ./failed -aligned true
./sbin/start-cli.sh -e "select * from root.db.**" // import 没有成功