diff --git a/tests/army/frame/caseBase.py.sql b/tests/army/frame/caseBase.py.sql deleted file mode 100644 index 0d483a61611d..000000000000 --- a/tests/army/frame/caseBase.py.sql +++ /dev/null @@ -1,1856 +0,0 @@ -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -select database();; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from vtb_org_normal_1.tinyint_col, smallint_col smallint from vtb_org_normal_2.smallint_col, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double from vtb_org_normal_0.double_col, bool_col bool from vtb_org_normal_1.bool_col, binary_16_col binary(16) from vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, u_bigint_col from vtb_org_normal_0.u_bigint_col, tinyint_col from vtb_org_normal_1.tinyint_col, smallint_col from vtb_org_normal_2.smallint_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, double_col from vtb_org_normal_0.double_col, bool_col from vtb_org_normal_1.bool_col, binary_16_col from vtb_org_normal_2.binary_16_col,binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from vtb_org_child_0.u_tinyint_col, u_smallint_col from vtb_org_child_1.u_smallint_col, u_int_col from vtb_org_child_2.u_int_col, u_bigint_col from vtb_org_child_0.u_bigint_col, tinyint_col from vtb_org_child_1.tinyint_col, smallint_col from vtb_org_child_2.smallint_col, int_col from vtb_org_child_0.int_col, bigint_col from vtb_org_child_1.bigint_col, float_col from vtb_org_child_2.float_col, double_col from vtb_org_child_0.double_col, bool_col from vtb_org_child_1.bool_col, binary_16_col from vtb_org_child_2.binary_16_col,binary_32_col from vtb_org_child_0.binary_32_col,nchar_16_col from vtb_org_child_1.nchar_16_col,nchar_32_col from vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -select database();; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from vtb_org_normal_1.tinyint_col, smallint_col smallint from vtb_org_normal_2.smallint_col, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double from vtb_org_normal_0.double_col, bool_col bool from vtb_org_normal_1.bool_col, binary_16_col binary(16) from vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, u_bigint_col from vtb_org_normal_0.u_bigint_col, tinyint_col from vtb_org_normal_1.tinyint_col, smallint_col from vtb_org_normal_2.smallint_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, double_col from vtb_org_normal_0.double_col, bool_col from vtb_org_normal_1.bool_col, binary_16_col from vtb_org_normal_2.binary_16_col,binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from vtb_org_child_0.u_tinyint_col, u_smallint_col from vtb_org_child_1.u_smallint_col, u_int_col from vtb_org_child_2.u_int_col, u_bigint_col from vtb_org_child_0.u_bigint_col, tinyint_col from vtb_org_child_1.tinyint_col, smallint_col from vtb_org_child_2.smallint_col, int_col from vtb_org_child_0.int_col, bigint_col from vtb_org_child_1.bigint_col, float_col from vtb_org_child_2.float_col, double_col from vtb_org_child_0.double_col, bool_col from vtb_org_child_1.bool_col, binary_16_col from vtb_org_child_2.binary_16_col,binary_32_col from vtb_org_child_0.binary_32_col,nchar_16_col from vtb_org_child_1.nchar_16_col,nchar_32_col from vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -select database();; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from vtb_org_normal_1.tinyint_col, smallint_col smallint from vtb_org_normal_2.smallint_col, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double from vtb_org_normal_0.double_col, bool_col bool from vtb_org_normal_1.bool_col, binary_16_col binary(16) from vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, u_bigint_col from vtb_org_normal_0.u_bigint_col, tinyint_col from vtb_org_normal_1.tinyint_col, smallint_col from vtb_org_normal_2.smallint_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, double_col from vtb_org_normal_0.double_col, bool_col from vtb_org_normal_1.bool_col, binary_16_col from vtb_org_normal_2.binary_16_col,binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from vtb_org_child_0.u_tinyint_col, u_smallint_col from vtb_org_child_1.u_smallint_col, u_int_col from vtb_org_child_2.u_int_col, u_bigint_col from vtb_org_child_0.u_bigint_col, tinyint_col from vtb_org_child_1.tinyint_col, smallint_col from vtb_org_child_2.smallint_col, int_col from vtb_org_child_0.int_col, bigint_col from vtb_org_child_1.bigint_col, float_col from vtb_org_child_2.float_col, double_col from vtb_org_child_0.double_col, bool_col from vtb_org_child_1.bool_col, binary_16_col from vtb_org_child_2.binary_16_col,binary_32_col from vtb_org_child_0.binary_32_col,nchar_16_col from vtb_org_child_1.nchar_16_col,nchar_32_col from vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -select database();; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from vtb_org_normal_1.tinyint_col, smallint_col smallint from vtb_org_normal_2.smallint_col, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double from vtb_org_normal_0.double_col, bool_col bool from vtb_org_normal_1.bool_col, binary_16_col binary(16) from vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, u_bigint_col from vtb_org_normal_0.u_bigint_col, tinyint_col from vtb_org_normal_1.tinyint_col, smallint_col from vtb_org_normal_2.smallint_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, double_col from vtb_org_normal_0.double_col, bool_col from vtb_org_normal_1.bool_col, binary_16_col from vtb_org_normal_2.binary_16_col,binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from vtb_org_child_0.u_tinyint_col, u_smallint_col from vtb_org_child_1.u_smallint_col, u_int_col from vtb_org_child_2.u_int_col, u_bigint_col from vtb_org_child_0.u_bigint_col, tinyint_col from vtb_org_child_1.tinyint_col, smallint_col from vtb_org_child_2.smallint_col, int_col from vtb_org_child_0.int_col, bigint_col from vtb_org_child_1.bigint_col, float_col from vtb_org_child_2.float_col, double_col from vtb_org_child_0.double_col, bool_col from vtb_org_child_1.bool_col, binary_16_col from vtb_org_child_2.binary_16_col,binary_32_col from vtb_org_child_0.binary_32_col,nchar_16_col from vtb_org_child_1.nchar_16_col,nchar_32_col from vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -select database();; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from vtb_org_normal_1.tinyint_col, smallint_col smallint from vtb_org_normal_2.smallint_col, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double from vtb_org_normal_0.double_col, bool_col bool from vtb_org_normal_1.bool_col, binary_16_col binary(16) from vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, u_bigint_col from vtb_org_normal_0.u_bigint_col, tinyint_col from vtb_org_normal_1.tinyint_col, smallint_col from vtb_org_normal_2.smallint_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, double_col from vtb_org_normal_0.double_col, bool_col from vtb_org_normal_1.bool_col, binary_16_col from vtb_org_normal_2.binary_16_col,binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from vtb_org_child_0.u_tinyint_col, u_smallint_col from vtb_org_child_1.u_smallint_col, u_int_col from vtb_org_child_2.u_int_col, u_bigint_col from vtb_org_child_0.u_bigint_col, tinyint_col from vtb_org_child_1.tinyint_col, smallint_col from vtb_org_child_2.smallint_col, int_col from vtb_org_child_0.int_col, bigint_col from vtb_org_child_1.bigint_col, float_col from vtb_org_child_2.float_col, double_col from vtb_org_child_0.double_col, bool_col from vtb_org_child_1.bool_col, binary_16_col from vtb_org_child_2.binary_16_col,binary_32_col from vtb_org_child_0.binary_32_col,nchar_16_col from vtb_org_child_1.nchar_16_col,nchar_32_col from vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_0;; -create database test_vtable_select_0;; -use test_vtable_select_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_1;; -create database test_vtable_select_1;; -use test_vtable_select_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_2;; -create database test_vtable_select_2;; -use test_vtable_select_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_3;; -create database test_vtable_select_3;; -use test_vtable_select_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_3.vtb_org_child_2.float_col, double_col from test_vtable_select_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select_stb_0;; -create database test_vtable_select_stb_0;; -use test_vtable_select_stb_0;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_1;; -create database test_vtable_select_stb_1;; -use test_vtable_select_stb_1;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_2;; -create database test_vtable_select_stb_2;; -use test_vtable_select_stb_2;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select_stb_3;; -create database test_vtable_select_stb_3;; -use test_vtable_select_stb_3;; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col smallint from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col int from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col double from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col bool from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col binary(16) from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col bigint from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col float from test_vtable_select_stb_0.vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_normal_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_normal_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_normal_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_normal_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_normal_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_normal_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_normal_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_normal_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_normal_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_normal_2.u_int_col, int_col from test_vtable_select_stb_3.vtb_org_normal_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_normal_1.bigint_col, float_col from test_vtable_select_stb_0.vtb_org_normal_2.float_col, binary_32_col from test_vtable_select_stb_1.vtb_org_normal_0.binary_32_col,nchar_16_col from test_vtable_select_stb_2.vtb_org_normal_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_3.vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from test_vtable_select_stb_0.vtb_org_child_0.u_tinyint_col, u_smallint_col from test_vtable_select_stb_1.vtb_org_child_1.u_smallint_col, u_int_col from test_vtable_select_stb_2.vtb_org_child_2.u_int_col, u_bigint_col from test_vtable_select_stb_3.vtb_org_child_0.u_bigint_col, tinyint_col from test_vtable_select_stb_2.vtb_org_child_1.tinyint_col, smallint_col from test_vtable_select_stb_0.vtb_org_child_2.smallint_col, int_col from test_vtable_select_stb_1.vtb_org_child_0.int_col, bigint_col from test_vtable_select_stb_2.vtb_org_child_1.bigint_col, float_col from test_vtable_select_stb_3.vtb_org_child_2.float_col, double_col from test_vtable_select_stb_2.vtb_org_child_0.double_col, bool_col from test_vtable_select_stb_0.vtb_org_child_1.bool_col, binary_16_col from test_vtable_select_stb_1.vtb_org_child_2.binary_16_col,binary_32_col from test_vtable_select_stb_2.vtb_org_child_0.binary_32_col,nchar_16_col from test_vtable_select_stb_3.vtb_org_child_1.nchar_16_col,nchar_32_col from test_vtable_select_stb_2.vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -drop database if exists test_vtable_select;; -create database test_vtable_select;; -use test_vtable_select;; -select database();; -CREATE STABLE `vtb_org_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32)); -CREATE TABLE `vtb_org_child_0` USING `vtb_org_stb` TAGS (0, false, 0, 0, 'child0', 'child0');; -CREATE TABLE `vtb_org_child_1` USING `vtb_org_stb` TAGS (1, false, 1, 1, 'child1', 'child1');; -CREATE TABLE `vtb_org_child_2` USING `vtb_org_stb` TAGS (2, false, 2, 2, 'child2', 'child2');; -CREATE TABLE `vtb_org_child_3` USING `vtb_org_stb` TAGS (3, false, 3, 3, 'child3', 'child3');; -CREATE TABLE `vtb_org_child_4` USING `vtb_org_stb` TAGS (4, false, 4, 4, 'child4', 'child4');; -CREATE TABLE `vtb_org_child_5` USING `vtb_org_stb` TAGS (5, false, 5, 5, 'child5', 'child5');; -CREATE TABLE `vtb_org_child_6` USING `vtb_org_stb` TAGS (6, false, 6, 6, 'child6', 'child6');; -CREATE TABLE `vtb_org_child_7` USING `vtb_org_stb` TAGS (7, false, 7, 7, 'child7', 'child7');; -CREATE TABLE `vtb_org_child_8` USING `vtb_org_stb` TAGS (8, false, 8, 8, 'child8', 'child8');; -CREATE TABLE `vtb_org_child_9` USING `vtb_org_stb` TAGS (9, false, 9, 9, 'child9', 'child9');; -CREATE TABLE `vtb_org_child_10` USING `vtb_org_stb` TAGS (10, false, 10, 10, 'child10', 'child10');; -CREATE TABLE `vtb_org_child_11` USING `vtb_org_stb` TAGS (11, false, 11, 11, 'child11', 'child11');; -CREATE TABLE `vtb_org_child_12` USING `vtb_org_stb` TAGS (12, false, 12, 12, 'child12', 'child12');; -CREATE TABLE `vtb_org_child_13` USING `vtb_org_stb` TAGS (13, false, 13, 13, 'child13', 'child13');; -CREATE TABLE `vtb_org_child_14` USING `vtb_org_stb` TAGS (14, false, 14, 14, 'child14', 'child14');; -CREATE TABLE `vtb_org_normal_0` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_1` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_2` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_3` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_4` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_5` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_6` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_7` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_8` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_9` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_10` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_11` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_12` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_13` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -CREATE TABLE `vtb_org_normal_14` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16), binary_32_col binary(32), nchar_16_col nchar(16), nchar_32_col nchar(32)) SMA(u_tinyint_col); -insert into vtb_org_normal_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_child_0 file '/home/tony/codes/TDengine/tests/army/vtable/data/data1.csv';; -insert into vtb_org_normal_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_child_1 file '/home/tony/codes/TDengine/tests/army/vtable/data/data2.csv';; -insert into vtb_org_normal_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -insert into vtb_org_child_2 file '/home/tony/codes/TDengine/tests/army/vtable/data/data3.csv';; -CREATE VTABLE `vtb_virtual_ntb_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned from vtb_org_normal_0.u_bigint_col, tinyint_col tinyint from vtb_org_normal_1.tinyint_col, smallint_col smallint from vtb_org_normal_2.smallint_col, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double from vtb_org_normal_0.double_col, bool_col bool from vtb_org_normal_1.bool_col, binary_16_col binary(16) from vtb_org_normal_2.binary_16_col,binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_half_full` (ts timestamp, u_tinyint_col tinyint unsigned from vtb_org_normal_0.u_tinyint_col, u_smallint_col smallint unsigned from vtb_org_normal_1.u_smallint_col, u_int_col int unsigned from vtb_org_normal_2.u_int_col, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int from vtb_org_normal_0.int_col, bigint_col bigint from vtb_org_normal_1.bigint_col, float_col float from vtb_org_normal_2.float_col, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32) from vtb_org_normal_0.binary_32_col,nchar_16_col nchar(16) from vtb_org_normal_1.nchar_16_col,nchar_32_col nchar(32) from vtb_org_normal_2.nchar_32_col); -CREATE VTABLE `vtb_virtual_ntb_empty` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)); -CREATE STABLE `vtb_virtual_stb` (ts timestamp, u_tinyint_col tinyint unsigned, u_smallint_col smallint unsigned, u_int_col int unsigned, u_bigint_col bigint unsigned, tinyint_col tinyint, smallint_col smallint, int_col int, bigint_col bigint, float_col float, double_col double, bool_col bool, binary_16_col binary(16),binary_32_col binary(32),nchar_16_col nchar(16),nchar_32_col nchar(32)) TAGS (int_tag int,bool_tag bool,float_tag float,double_tag double,nchar_32_tag nchar(32),binary_32_tag binary(32))VIRTUAL 1; -CREATE VTABLE `vtb_virtual_ctb_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, u_bigint_col from vtb_org_normal_0.u_bigint_col, tinyint_col from vtb_org_normal_1.tinyint_col, smallint_col from vtb_org_normal_2.smallint_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, double_col from vtb_org_normal_0.double_col, bool_col from vtb_org_normal_1.bool_col, binary_16_col from vtb_org_normal_2.binary_16_col,binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (0, false, 0, 0, 'child0', 'child0'); -CREATE VTABLE `vtb_virtual_ctb_half_full` (u_tinyint_col from vtb_org_normal_0.u_tinyint_col, u_smallint_col from vtb_org_normal_1.u_smallint_col, u_int_col from vtb_org_normal_2.u_int_col, int_col from vtb_org_normal_0.int_col, bigint_col from vtb_org_normal_1.bigint_col, float_col from vtb_org_normal_2.float_col, binary_32_col from vtb_org_normal_0.binary_32_col,nchar_16_col from vtb_org_normal_1.nchar_16_col,nchar_32_col from vtb_org_normal_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (1, false, 1, 1, 'child1', 'child1'); -CREATE VTABLE `vtb_virtual_ctb_empty` USING `vtb_virtual_stb` TAGS (2, false, 2, 2, 'child2', 'child2'); -CREATE VTABLE `vtb_virtual_ctb_mix` (u_tinyint_col from vtb_org_child_0.u_tinyint_col, u_smallint_col from vtb_org_child_1.u_smallint_col, u_int_col from vtb_org_child_2.u_int_col, u_bigint_col from vtb_org_child_0.u_bigint_col, tinyint_col from vtb_org_child_1.tinyint_col, smallint_col from vtb_org_child_2.smallint_col, int_col from vtb_org_child_0.int_col, bigint_col from vtb_org_child_1.bigint_col, float_col from vtb_org_child_2.float_col, double_col from vtb_org_child_0.double_col, bool_col from vtb_org_child_1.bool_col, binary_16_col from vtb_org_child_2.binary_16_col,binary_32_col from vtb_org_child_0.binary_32_col,nchar_16_col from vtb_org_child_1.nchar_16_col,nchar_32_col from vtb_org_child_2.nchar_32_col)USING `vtb_virtual_stb` TAGS (3, false, 3, 3, 'child3', 'child3'); -create database test_vtable_query_after_alter_origin_table;; -use test_vtable_query_after_alter_origin_table;; -create table ntb_0(ts timestamp, c1 int, c2 int, c3 int);; -create stable stb (ts timestamp, c1 int, c2 int, c3 int) tags (t1 int);; -create table ctb_0 using stb tags (1);; -insert into ntb_0 values('2017-07-14 10:40:00.000', 1, 1, 1);; -insert into ntb_0 values('2017-07-14 10:40:00.001', 2, 2, 2);; -insert into ntb_0 values('2017-07-14 10:40:00.002', 3, 3, 3);; -insert into ctb_0 values('2017-07-14 10:40:00.000', 1, 1, 1);; -insert into ctb_0 values('2017-07-14 10:40:00.001', 2, 2, 2);; -insert into ctb_0 values('2017-07-14 10:40:00.002', 3, 3, 3);; -create stable vstb (ts timestamp, c1 int, c2 int, c3 int) tags (t1 int) virtual 1;; -create vtable vtb_0 (c1 from ntb_0.c1, c2 from ntb_0.c2, c3 from ntb_0.c3) using vstb tags (1);; -create vtable vtb_1 (c1 from ctb_0.c1, c2 from ctb_0.c2, c3 from ctb_0.c3) using vstb tags (2);; -use test_vtable_query_after_alter_origin_table;; -select database();; -select * from vstb;; -alter table ntb_0 drop column c3;; -alter table ntb_0 add column c3 int;; -select * from vstb;; -alter table stb drop column c3;; -alter table stb add column c3 int;; -select * from vstb;; diff --git a/tests/army/tools/taosdump/native/taosdumpMaxCols.py b/tests/army/tools/taosdump/native/taosdumpMaxCols.py new file mode 100644 index 000000000000..93eba979ac4d --- /dev/null +++ b/tests/army/tools/taosdump/native/taosdumpMaxCols.py @@ -0,0 +1,488 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +"""Test taosdump with maximum columns, all data types, and case-sensitive names. + +Verifies fixes for: + - avro-c 64KB schema_buf overflow (corrupted 35-byte avro files) + - SHOW CREATE TABLE 65535-char truncation (DESCRIBE fallback) + - all data types survive round-trip through avro export/import + - backtick-quoted case-sensitive column/tag names preserved + +Part 1 - Export test (3968 cols + 128 tags, 64-char names): + Verifies avro files are NOT corrupted and pass --inspect. + +Part 2 - Round-trip test (3968 cols + 128 tags, all data types, + mixed-case names): + Full export → drop → restore → verify cycle. + Exercises DESCRIBE fallback path since SHOW CREATE TABLE + will be truncated at 65535 chars. +""" + +import os +import subprocess + +import frame +import frame.etool +from frame.log import * +from frame.cases import * +from frame.sql import * +from frame.caseBase import * +from frame import * + + +# All TDengine data types for columns (excluding first TIMESTAMP column). +# Each entry: (sql_type_str, needs_length, default_length, sample_value, verify_fn) +# verify_fn: callable(inserted, queried) -> bool +ALL_COL_TYPES = [ + ("BOOL", False, 0, "true", lambda i, q: q in (True, 1, "true")), + ("TINYINT", False, 0, "1", lambda i, q: int(q) == 1), + ("SMALLINT", False, 0, "2", lambda i, q: int(q) == 2), + ("INT", False, 0, "3", lambda i, q: int(q) == 3), + ("BIGINT", False, 0, "4", lambda i, q: int(q) == 4), + ("FLOAT", False, 0, "5.5", lambda i, q: abs(float(q) - 5.5) < 0.01), + ("DOUBLE", False, 0, "6.6", lambda i, q: abs(float(q) - 6.6) < 1e-9), + ("BINARY", True, 20, "'bin_v'", lambda i, q: q.strip() == "bin_v"), + ("NCHAR", True, 20, "'nch_v'", lambda i, q: q.strip() == "nch_v"), + ("TINYINT UNSIGNED", False, 0, "7", lambda i, q: int(q) == 7), + ("SMALLINT UNSIGNED", False, 0, "8", lambda i, q: int(q) == 8), + ("INT UNSIGNED", False, 0, "9", lambda i, q: int(q) == 9), + ("BIGINT UNSIGNED", False, 0, "10", lambda i, q: int(q) == 10), + ("VARBINARY", True, 20, "'\\x4142'",lambda i, q: True), # binary compare tricky + ("GEOMETRY", True, 50, "'POINT(1 2)'", lambda i, q: True), # geometry compare tricky +] + +# Tag types: same as column types (all 15 are valid as tags) +ALL_TAG_TYPES = ALL_COL_TYPES + + +class TDTestCase(TBase): + + # TDengine limits: columns + tags <= 4096 + MAX_COL_TAG = 4096 + MAX_TAGS = 128 + STB_COLUMNS = MAX_COL_TAG - MAX_TAGS # 3968 + NTB_COLUMNS = MAX_COL_TAG # 4096 + COL_NAME_MAX = 64 + + def _genWideName(self, prefix, idx, length=64): + """Generate a column name of exactly `length` chars.""" + base = "%s%04d_" % (prefix, idx) + pad_len = length - len(base) + if pad_len > 0: + base += "a" * pad_len + return base[:length] + + def _genMixedCaseName(self, prefix, idx): + """Generate a mixed-case column name like 'Col_0001_Abc'. + + Uses backtick quoting so TDengine preserves case. + """ + return "%s_%04d_Abc" % (prefix, idx) + + def _colTypeAt(self, idx): + """Return type info for column index (0-based, excluding ts).""" + return ALL_COL_TYPES[idx % len(ALL_COL_TYPES)] + + def _tagTypeAt(self, idx): + """Return type info for tag index (0-based).""" + return ALL_TAG_TYPES[idx % len(ALL_TAG_TYPES)] + + def _testExportWideTable(self, binPath): + """Part 1: Export test with maximum wide table.""" + tdLog.info("=" * 60) + tdLog.info("PART 1: Export test - max cols + max tags + 64-char names") + tdLog.info("=" * 60) + + dbName = "maxcoldb" + stbName = "stb_wide" + ctbName = "ctb_wide" + ntbName = "ntb_wide" + + tdSql.execute("DROP DATABASE IF EXISTS %s" % dbName) + tdSql.execute("CREATE DATABASE %s KEEP 3650" % dbName) + tdSql.execute("USE %s" % dbName) + + # 1. Create supertable: 3968 cols + 128 tags, 64-char names + tdLog.info("Creating STABLE: %d cols + %d tags (64-char names)" + % (self.STB_COLUMNS, self.MAX_TAGS)) + col_defs = ["`ts` TIMESTAMP"] + for i in range(self.STB_COLUMNS - 1): + col_defs.append("`%s` FLOAT" % self._genWideName("c", i, self.COL_NAME_MAX)) + tag_defs = [] + for i in range(self.MAX_TAGS): + tag_defs.append("`%s` BINARY(20)" % self._genWideName("t", i, self.COL_NAME_MAX)) + + sql = "CREATE TABLE `%s`.`%s` (%s) TAGS(%s)" % ( + dbName, stbName, ", ".join(col_defs), ", ".join(tag_defs)) + tdLog.info("CREATE STABLE SQL length: %d bytes" % len(sql)) + tdSql.execute(sql) + + # 2. Child table + data + tag_vals = ", ".join(["'tag_val_%04d________'" % i + for i in range(self.MAX_TAGS)]) + tdSql.execute("CREATE TABLE `%s`.`%s` USING `%s`.`%s` TAGS(%s)" + % (dbName, ctbName, dbName, stbName, tag_vals)) + vals = ["now"] + ["%.1f" % (i * 0.1) for i in range(self.STB_COLUMNS - 1)] + tdSql.execute("INSERT INTO `%s`.`%s` VALUES (%s)" + % (dbName, ctbName, ", ".join(vals))) + + # 3. Normal table: 4096 cols, 64-char names + tdLog.info("Creating normal table: %d cols (64-char names)" % self.NTB_COLUMNS) + ntb_defs = ["`ts` TIMESTAMP"] + for i in range(self.NTB_COLUMNS - 1): + ntb_defs.append("`%s` FLOAT" % self._genWideName("n", i, self.COL_NAME_MAX)) + tdSql.execute("CREATE TABLE `%s`.`%s` (%s)" + % (dbName, ntbName, ", ".join(ntb_defs))) + nvals = ["now"] + ["%.1f" % (i * 0.5) for i in range(self.NTB_COLUMNS - 1)] + tdSql.execute("INSERT INTO `%s`.`%s` VALUES (%s)" + % (dbName, ntbName, ", ".join(nvals))) + + # 4. Export + dumpdir = os.path.abspath(self.tmpdir + "/maxcol_export") + if os.path.exists(dumpdir): + os.system("rm -rf %s" % dumpdir) + os.makedirs(dumpdir) + + dump_cmd = "%s -c %s --databases %s -o %s -T 1" % ( + binPath, self.cfgPath, dbName, dumpdir) + tdLog.info("Dump command: %s" % dump_cmd) + rc = os.system(dump_cmd) + if rc != 0: + tdLog.exit("taosdump export failed with rc=%d" % rc) + + # 5. Verify avro files NOT corrupted (size > 100 bytes) + avro_files = [] + for root, dirs, files in os.walk(dumpdir): + for f in files: + if f.endswith(".avro"): + avro_files.append(os.path.join(root, f)) + + tdLog.info("Found %d avro files" % len(avro_files)) + if len(avro_files) == 0: + tdLog.exit("No avro files found in dump output!") + + for af in avro_files: + fsize = os.path.getsize(af) + tdLog.info(" %s size=%d bytes" % (os.path.basename(af), fsize)) + if fsize < 100: + tdLog.exit("CORRUPTED avro (size=%d): %s" % (fsize, af)) + + tdLog.info("All %d avro files have valid sizes" % len(avro_files)) + + # 6. Inspect all avro files + for af in avro_files: + inspect_cmd = "%s --inspect %s 2>&1" % (binPath, af) + output = subprocess.check_output(inspect_cmd, shell=True).decode("utf-8") + if "ERROR" in output or "Unable" in output or "Cannot" in output: + tdLog.exit("Inspect error on %s: %s" + % (os.path.basename(af), output[:500])) + tdLog.info(" Inspect OK: %s" % os.path.basename(af)) + + tdLog.info("All avro files pass --inspect") + + tdSql.execute("DROP DATABASE IF EXISTS %s" % dbName) + + def _testRoundtripMaxCols(self, binPath): + """Part 2: Round-trip with max cols, all types, mixed-case names. + + 3968 cols + 128 tags, covering all 15 TDengine data types + round-robin. Column names use mixed case (e.g. Col_0001_Abc) + to verify case-sensitive backtick quoting survives round-trip. + SHOW CREATE TABLE will be truncated -> DESCRIBE fallback path. + """ + tdLog.info("=" * 60) + tdLog.info("PART 2: Round-trip - max cols, all types, case-sensitive names") + tdLog.info("=" * 60) + + dbName = "allcoldb" + stbName = "Stb_Mix" # mixed case table name + ctbName = "Ctb_Mix" + ntbName = "Ntb_Mix" + num_cols = self.STB_COLUMNS # 3968 + num_tags = self.MAX_TAGS # 128 + ntb_cols = self.NTB_COLUMNS # 4096 + + tdSql.execute("DROP DATABASE IF EXISTS %s" % dbName) + tdSql.execute("CREATE DATABASE %s KEEP 3650" % dbName) + tdSql.execute("USE %s" % dbName) + + # -- Build supertable DDL -- + col_defs = ["`ts` TIMESTAMP"] + col_vals = ["now"] + for i in range(num_cols - 1): + cname = self._genMixedCaseName("Col", i) + tinfo = self._colTypeAt(i) + type_str, needs_len, deflen, sample_val = tinfo[0], tinfo[1], tinfo[2], tinfo[3] + if needs_len: + col_defs.append("`%s` %s(%d)" % (cname, type_str, deflen)) + else: + col_defs.append("`%s` %s" % (cname, type_str)) + col_vals.append(sample_val) + + tag_defs = [] + tag_vals = [] + for i in range(num_tags): + tname = self._genMixedCaseName("Tag", i) + tinfo = self._tagTypeAt(i) + type_str, needs_len, deflen, sample_val = tinfo[0], tinfo[1], tinfo[2], tinfo[3] + if needs_len: + tag_defs.append("`%s` %s(%d)" % (tname, type_str, deflen)) + else: + tag_defs.append("`%s` %s" % (tname, type_str)) + tag_vals.append(sample_val) + + create_stb = "CREATE TABLE `%s`.`%s` (%s) TAGS(%s)" % ( + dbName, stbName, ", ".join(col_defs), ", ".join(tag_defs)) + tdLog.info("STB DDL length: %d bytes, %d cols + %d tags" + % (len(create_stb), num_cols, num_tags)) + tdSql.execute(create_stb) + + # Child table + data + create_ctb = "CREATE TABLE `%s`.`%s` USING `%s`.`%s` TAGS(%s)" % ( + dbName, ctbName, dbName, stbName, ", ".join(tag_vals)) + tdSql.execute(create_ctb) + insert_sql = "INSERT INTO `%s`.`%s` VALUES (%s)" % ( + dbName, ctbName, ", ".join(col_vals)) + tdSql.execute(insert_sql) + tdLog.info("STB child table created with 1 row") + + # -- Build normal table DDL (4096 cols, all types) -- + ntb_defs = ["`ts` TIMESTAMP"] + ntb_vals = ["now"] + for i in range(ntb_cols - 1): + cname = self._genMixedCaseName("Ntb", i) + tinfo = self._colTypeAt(i) + type_str, needs_len, deflen, sample_val = tinfo[0], tinfo[1], tinfo[2], tinfo[3] + if needs_len: + ntb_defs.append("`%s` %s(%d)" % (cname, type_str, deflen)) + else: + ntb_defs.append("`%s` %s" % (cname, type_str)) + ntb_vals.append(sample_val) + + create_ntb = "CREATE TABLE `%s`.`%s` (%s)" % ( + dbName, ntbName, ", ".join(ntb_defs)) + tdLog.info("NTB DDL length: %d bytes, %d cols" % (len(create_ntb), ntb_cols)) + tdSql.execute(create_ntb) + tdSql.execute("INSERT INTO `%s`.`%s` VALUES (%s)" % ( + dbName, ntbName, ", ".join(ntb_vals))) + tdLog.info("NTB created with 1 row") + + # -- Record originals -- + tdSql.query("SELECT COUNT(*) FROM `%s`.`%s`" % (dbName, stbName)) + orig_stb_cnt = tdSql.getData(0, 0) + tdSql.query("SELECT COUNT(*) FROM `%s`.`%s`" % (dbName, ntbName)) + orig_ntb_cnt = tdSql.getData(0, 0) + + # Pick a few representative columns to verify values after restore + # For each type, pick the first occurrence + verify_cols = {} # col_name -> (type_str, sample_val, verify_fn) + for i in range(min(num_cols - 1, len(ALL_COL_TYPES))): + cname = self._genMixedCaseName("Col", i) + tinfo = ALL_COL_TYPES[i] + verify_cols[cname] = (tinfo[0], tinfo[3], tinfo[4]) + + verify_tags = {} + for i in range(min(num_tags, len(ALL_TAG_TYPES))): + tname = self._genMixedCaseName("Tag", i) + tinfo = ALL_TAG_TYPES[i] + verify_tags[tname] = (tinfo[0], tinfo[3], tinfo[4]) + + # Query original values for verify columns + orig_col_vals = {} + for cname in verify_cols: + tdSql.query("SELECT `%s` FROM `%s`.`%s`" % (cname, dbName, ctbName)) + orig_col_vals[cname] = tdSql.getData(0, 0) + + orig_tag_vals = {} + for tname in verify_tags: + tdSql.query("SELECT `%s` FROM `%s`.`%s`" % (tname, dbName, ctbName)) + orig_tag_vals[tname] = tdSql.getData(0, 0) + + orig_ntb_vals = {} + for i in range(min(ntb_cols - 1, len(ALL_COL_TYPES))): + cname = self._genMixedCaseName("Ntb", i) + tdSql.query("SELECT `%s` FROM `%s`.`%s`" % (cname, dbName, ntbName)) + orig_ntb_vals[cname] = tdSql.getData(0, 0) + + # -- Export -- + dumpdir = os.path.abspath(self.tmpdir + "/allcol_roundtrip") + if os.path.exists(dumpdir): + os.system("rm -rf %s" % dumpdir) + os.makedirs(dumpdir) + + dump_cmd = "%s -c %s --databases %s -o %s -T 1" % ( + binPath, self.cfgPath, dbName, dumpdir) + tdLog.info("Dump command: %s" % dump_cmd) + rc = os.system(dump_cmd) + if rc != 0: + tdLog.exit("taosdump export failed with rc=%d" % rc) + + avro_files = [] + for root, dirs, files in os.walk(dumpdir): + for f in files: + if f.endswith(".avro"): + avro_files.append(os.path.join(root, f)) + tdLog.info("Found %d avro files" % len(avro_files)) + for af in avro_files: + fsize = os.path.getsize(af) + tdLog.info(" %s size=%d" % (os.path.basename(af), fsize)) + if fsize < 100: + tdLog.exit("Corrupted avro: %s (size=%d)" % (af, fsize)) + + # -- Drop + restore -- + tdSql.execute("DROP DATABASE %s" % dbName) + + restore_cmd = "%s -c %s -i %s" % (binPath, self.cfgPath, dumpdir) + tdLog.info("Restore command: %s" % restore_cmd) + rc = os.system(restore_cmd) + if rc != 0: + tdLog.exit("taosdump import failed with rc=%d" % rc) + + # -- Verify -- + tdSql.execute("USE %s" % dbName) + + # Schema: supertable + tdSql.query("DESCRIBE `%s`" % stbName) + if tdSql.queryRows != num_cols + num_tags: + tdLog.exit("STB schema: expected %d rows, got %d" + % (num_cols + num_tags, tdSql.queryRows)) + tdLog.info("STB schema restored: %d cols + %d tags" % (num_cols, num_tags)) + + # Schema: verify each column type is correct + # DESCRIBE returns rows: field, type, length, note + desc_map = {} + for i in range(tdSql.queryRows): + fname = tdSql.getData(i, 0) + ftype = tdSql.getData(i, 1) + desc_map[fname] = ftype + + type_errors = 0 + for i in range(min(num_cols - 1, len(ALL_COL_TYPES))): + cname = self._genMixedCaseName("Col", i) + expected_type = ALL_COL_TYPES[i][0].upper() + # TDengine may report BINARY as VARCHAR etc + actual = desc_map.get(cname, "MISSING").upper() + # normalize: BINARY -> VARCHAR in some versions + if expected_type == "BINARY" and actual == "VARCHAR": + continue + if expected_type not in actual and actual not in expected_type: + tdLog.info(" TYPE MISMATCH col `%s`: expected %s, got %s" + % (cname, expected_type, actual)) + type_errors += 1 + if type_errors > 0: + tdLog.exit("STB column type mismatches: %d" % type_errors) + tdLog.info("STB column types verified (first %d types)" % len(ALL_COL_TYPES)) + + # Verify case-sensitive names survived + case_check_name = self._genMixedCaseName("Col", 0) # e.g. Col_0000_Abc + if case_check_name not in desc_map: + tdLog.exit("Case-sensitive column name `%s` not found after restore!" + % case_check_name) + tdLog.info("Case-sensitive column names preserved after round-trip") + + # Row counts + tdSql.query("SELECT COUNT(*) FROM `%s`" % stbName) + if tdSql.getData(0, 0) != orig_stb_cnt: + tdLog.exit("STB count: expected %s, got %s" + % (orig_stb_cnt, tdSql.getData(0, 0))) + tdLog.info("STB row count: %s" % orig_stb_cnt) + + tdSql.query("SELECT COUNT(*) FROM `%s`" % ntbName) + if tdSql.getData(0, 0) != orig_ntb_cnt: + tdLog.exit("NTB count: expected %s, got %s" + % (orig_ntb_cnt, tdSql.getData(0, 0))) + tdLog.info("NTB row count: %s" % orig_ntb_cnt) + + # Column values for representative types + mismatch = 0 + for cname, (type_str, _, verify_fn) in verify_cols.items(): + tdSql.query("SELECT `%s` FROM `%s`.`%s`" % (cname, dbName, ctbName)) + restored = tdSql.getData(0, 0) + original = orig_col_vals[cname] + # compare as strings for simplicity, types like GEOMETRY/VARBINARY + # use the lenient verify_fn + if str(restored) != str(original): + if not verify_fn(None, restored): + tdLog.info(" VALUE MISMATCH col `%s` (%s): orig=%s restored=%s" + % (cname, type_str, original, restored)) + mismatch += 1 + if mismatch > 0: + tdLog.exit("STB column value mismatches: %d" % mismatch) + tdLog.info("STB column values verified for all %d types" % len(verify_cols)) + + # Tag values + mismatch = 0 + for tname, (type_str, _, verify_fn) in verify_tags.items(): + tdSql.query("SELECT `%s` FROM `%s`.`%s`" % (tname, dbName, ctbName)) + restored = tdSql.getData(0, 0) + original = orig_tag_vals[tname] + if str(restored) != str(original): + if not verify_fn(None, restored): + tdLog.info(" VALUE MISMATCH tag `%s` (%s): orig=%s restored=%s" + % (tname, type_str, original, restored)) + mismatch += 1 + if mismatch > 0: + tdLog.exit("STB tag value mismatches: %d" % mismatch) + tdLog.info("STB tag values verified for all %d types" % len(verify_tags)) + + # Normal table schema + tdSql.query("DESCRIBE `%s`" % ntbName) + if tdSql.queryRows != ntb_cols: + tdLog.exit("NTB schema: expected %d, got %d" + % (ntb_cols, tdSql.queryRows)) + tdLog.info("NTB schema restored: %d cols" % ntb_cols) + + # Normal table values + mismatch = 0 + for cname, original in orig_ntb_vals.items(): + tdSql.query("SELECT `%s` FROM `%s`.`%s`" % (cname, dbName, ntbName)) + restored = tdSql.getData(0, 0) + if str(restored) != str(original): + i = int(cname.split("_")[1]) + verify_fn = ALL_COL_TYPES[i % len(ALL_COL_TYPES)][4] + if not verify_fn(None, restored): + tdLog.info(" VALUE MISMATCH ntb col `%s`: orig=%s restored=%s" + % (cname, original, restored)) + mismatch += 1 + if mismatch > 0: + tdLog.exit("NTB column value mismatches: %d" % mismatch) + tdLog.info("NTB column values verified for all %d types" % len(orig_ntb_vals)) + + tdSql.execute("DROP DATABASE IF EXISTS %s" % dbName) + + def run(self): + tdSql.prepare() + binPath = frame.etool.taosDumpFile() + if binPath == "": + tdLog.exit("taosdump not found!") + tdLog.info("taosdump found: %s" % binPath) + + # client cfg for taosdump to connect to framework taosd + # binPath() returns .../debug/build/bin/, go up 3 levels to project root + self.cfgPath = os.path.normpath(os.path.join( + frame.epath.binPath(), "..", "..", "..", "sim", "psim", "cfg")) + tdLog.info("cfgPath: %s" % self.cfgPath) + + self._testExportWideTable(binPath) + self._testRoundtripMaxCols(binPath) + + tdLog.info("All verifications passed") + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 87b2cb4edb77..f50ebfa77dc5 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -245,6 +245,7 @@ ,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpInDiffType.py ,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTest2.py ,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTestTypeTinyInt.py +,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpMaxCols.py ,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeDouble.py -B ,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeUnsignedBigInt.py -B ,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpEscapedDb.py -B diff --git a/tools/taos-tools/src/taosdump.c b/tools/taos-tools/src/taosdump.c index 7cb5ecc64134..a0fd0cfe75ad 100644 --- a/tools/taos-tools/src/taosdump.c +++ b/tools/taos-tools/src/taosdump.c @@ -1841,6 +1841,155 @@ int getTableDes(TAOS *taos, return getTableTagValue(taos, dbName, table, &tableDes); } +// check if type needs length suffix in CREATE SQL +static bool typeNeedsLength(int type) { + return (type == TSDB_DATA_TYPE_BINARY || + type == TSDB_DATA_TYPE_NCHAR || + type == TSDB_DATA_TYPE_VARBINARY || + type == TSDB_DATA_TYPE_GEOMETRY); +} + +// build CREATE TABLE/STABLE SQL from DESCRIBE result +// used as fallback when SHOW CREATE TABLE is truncated or fails +static char *buildCreateSqlFromDescribe(void** taos_v, const char *dbName, char *tbName) { + char command[TSDB_DB_NAME_LEN + TSDB_TABLE_NAME_LEN + 128] = ""; + snprintf(command, sizeof(command), "DESCRIBE `%s`.`%s`", dbName, tbName); + + void *res = openQuery(taos_v, command); + if (res == NULL) { + errorPrint("%s() LN%d, DESCRIBE `%s`.`%s` failed\n", + __func__, __LINE__, dbName, tbName); + return NULL; + } + + // collect columns and tags from DESCRIBE result + // DESCRIBE returns: field, type, length, note + // note == "TAG" for tag columns, empty for normal columns + typedef struct { + char name[TSDB_COL_NAME_LEN]; + int type; + int length; + bool isTag; + } DescCol; + + int capacity = 4096 + 128; // max columns + tags + DescCol *descs = (DescCol *)calloc(capacity, sizeof(DescCol)); + if (NULL == descs) { + errorPrint("%s() LN%d, memory allocation failed\n", __func__, __LINE__); + closeQuery(res); + return NULL; + } + + int totalCols = 0; + int tagCount = 0; + TAOS_ROW row; + while ((row = taos_fetch_row(res)) != NULL && totalCols < capacity) { + int32_t *lengths = taos_fetch_lengths(res); + char typeStr[32] = {0}; + strncpy(descs[totalCols].name, + (char *)row[TSDB_DESCRIBE_METRIC_FIELD_INDEX], + min((int)lengths[TSDB_DESCRIBE_METRIC_FIELD_INDEX], TSDB_COL_NAME_LEN - 1)); + strncpy(typeStr, (char *)row[TSDB_DESCRIBE_METRIC_TYPE_INDEX], + min((int)lengths[TSDB_DESCRIBE_METRIC_TYPE_INDEX], (int)sizeof(typeStr) - 1)); + descs[totalCols].type = typeStrToType(typeStr); + descs[totalCols].length = *((int *)row[TSDB_DESCRIBE_METRIC_LENGTH_INDEX]); + + if (lengths[TSDB_DESCRIBE_METRIC_NOTE_INDEX] > 0) { + char note[COL_NOTE_LEN] = {0}; + strncpy(note, (char *)row[TSDB_DESCRIBE_METRIC_NOTE_INDEX], + min((int)lengths[TSDB_DESCRIBE_METRIC_NOTE_INDEX], COL_NOTE_LEN - 1)); + descs[totalCols].isTag = (strcmp(note, "TAG") == 0); + if (descs[totalCols].isTag) tagCount++; + } + totalCols++; + } + closeQuery(res); + + if (totalCols == 0) { + errorPrint("%s() LN%d, DESCRIBE returned no columns for `%s`.`%s`\n", + __func__, __LINE__, dbName, tbName); + free(descs); + return NULL; + } + + // tb is output to file table name + char *tb = tbName; + char tableName[TSDB_TABLE_NAME_LEN + 1]; + if (g_args.dotReplace && replaceCopy(tableName, tbName)) { + tb = tableName; + } + + // estimate buffer size: header + per-column ~(65 name + 20 type + 10 length + 3 punctuation) + int bufSize = 256 + totalCols * 100; + char *csql = (char *)calloc(1, bufSize); + if (NULL == csql) { + errorPrint("%s() LN%d, memory allocation failed\n", __func__, __LINE__); + free(descs); + return NULL; + } + + int pos = 0; + bool isStable = (tagCount > 0); + + // header + if (isStable) { + pos += snprintf(csql + pos, bufSize - pos, + "CREATE STABLE IF NOT EXISTS `%s`.`%s` (", dbName, tb); + } else { + pos += snprintf(csql + pos, bufSize - pos, + "CREATE TABLE IF NOT EXISTS `%s`.`%s` (", dbName, tb); + } + + // columns (non-tag) + bool firstCol = true; + for (int i = 0; i < totalCols; i++) { + if (descs[i].isTag) continue; + if (!firstCol) { + pos += snprintf(csql + pos, bufSize - pos, ", "); + } + if (typeNeedsLength(descs[i].type)) { + pos += snprintf(csql + pos, bufSize - pos, "`%s` %s(%d)", + descs[i].name, typeToStr(descs[i].type), descs[i].length); + } else { + pos += snprintf(csql + pos, bufSize - pos, "`%s` %s", + descs[i].name, typeToStr(descs[i].type)); + } + firstCol = false; + } + pos += snprintf(csql + pos, bufSize - pos, ")"); + + // tags + if (isStable) { + pos += snprintf(csql + pos, bufSize - pos, " TAGS ("); + bool firstTag = true; + for (int i = 0; i < totalCols; i++) { + if (!descs[i].isTag) continue; + if (!firstTag) { + pos += snprintf(csql + pos, bufSize - pos, ", "); + } + if (typeNeedsLength(descs[i].type)) { + pos += snprintf(csql + pos, bufSize - pos, "`%s` %s(%d)", + descs[i].name, typeToStr(descs[i].type), descs[i].length); + } else { + pos += snprintf(csql + pos, bufSize - pos, "`%s` %s", + descs[i].name, typeToStr(descs[i].type)); + } + firstTag = false; + } + pos += snprintf(csql + pos, bufSize - pos, ")"); + } + + free(descs); + + warnPrint("Used DESCRIBE fallback to build CREATE %s SQL for `%s`.`%s` " + "(SHOW CREATE TABLE was truncated or failed)\n", + isStable ? "STABLE" : "TABLE", dbName, tbName); + + debugPrint("%s() LN%d, fallback create sql: %s\n", __func__, __LINE__, csql); + + return csql; +} + // query from server char *queryCreateTableSql(void** taos_v, const char *dbName, char *tbName) { // combine sql @@ -1851,7 +2000,9 @@ char *queryCreateTableSql(void** taos_v, const char *dbName, char *tbName) { // query void* res = openQuery(taos_v, sql); if (res == NULL) { - return NULL; + warnPrint("SHOW CREATE TABLE failed for `%s`.`%s`, " + "trying DESCRIBE fallback\n", dbName, tbName); + return buildCreateSqlFromDescribe(taos_v, dbName, tbName); } // read @@ -1861,7 +2012,18 @@ char *queryCreateTableSql(void** taos_v, const char *dbName, char *tbName) { int32_t ret = readRow(res, 0, 1, &len, &data); if (ret != 0) { closeQuery(res); - return NULL; + warnPrint("SHOW CREATE TABLE read failed for `%s`.`%s`, " + "trying DESCRIBE fallback\n", dbName, tbName); + return buildCreateSqlFromDescribe(taos_v, dbName, tbName); + } + + // check if result is truncated (VARCHAR max is 65535) + if (len >= 64000) { + warnPrint("SHOW CREATE TABLE result for `%s`.`%s` is %u bytes " + "(likely truncated at 65535), using DESCRIBE fallback\n", + dbName, tbName, len); + closeQuery(res); + return buildCreateSqlFromDescribe(taos_v, dbName, tbName); } // prefix check @@ -2129,6 +2291,88 @@ static RecordSchema *parse_json_to_recordschema(json_t *element) { return recordSchema; } +/* Write a zigzag-encoded variable-length long to FILE */ +static int avro_zigzag_write_long(FILE *fp, int64_t l) { + uint8_t buf[10]; + int n = 0; + uint64_t v = (l >= 0) ? ((uint64_t)l << 1) : ((uint64_t)(~l) << 1 | 1); + while (v & ~0x7FULL) { + buf[n++] = (uint8_t)((v & 0x7F) | 0x80); + v >>= 7; + } + buf[n++] = (uint8_t)v; + return (fwrite(buf, 1, n, fp) == (size_t)n) ? 0 : -1; +} + +/* Write an avro "bytes" value: zigzag length + raw bytes */ +static int avro_raw_write_bytes(FILE *fp, const char *data, int64_t len) { + if (avro_zigzag_write_long(fp, len) != 0) return -1; + if (len > 0 && fwrite(data, 1, len, fp) != (size_t)len) return -1; + return 0; +} + +/* Write an avro "string" value (same encoding as bytes) */ +static int avro_raw_write_string(FILE *fp, const char *s) { + return avro_raw_write_bytes(fp, s, (int64_t)strlen(s)); +} + +/* + * Write a complete avro file header manually, bypassing the 64KB + * schema_buf limitation in avro-c's write_header(). + * + * Avro Object Container File header format: + * magic: "Obj" 0x01 + * metadata: avro map {count, (key,value)..., 0} + * - "avro.codec" => codec name (bytes) + * - "avro.schema" => schema JSON (bytes) + * sync: 16 random bytes + * + * Returns 0 on success, -1 on failure. + */ +static int writeAvroHeaderRaw(const char *path, const char *schemaJson, + const char *codecName, uint8_t *syncOut) { + FILE *fp = fopen(path, "wb"); + if (!fp) { + errorPrint("Cannot create avro file: %s\n", path); + return -1; + } + + /* Magic */ + uint8_t magic[4] = {'O', 'b', 'j', 0x01}; + if (fwrite(magic, 1, 4, fp) != 4) goto fail; + + /* Metadata map: 2 entries */ + if (avro_zigzag_write_long(fp, 2) != 0) goto fail; + + /* Entry 1: avro.codec */ + if (avro_raw_write_string(fp, "avro.codec") != 0) goto fail; + if (avro_raw_write_bytes(fp, codecName, (int64_t)strlen(codecName)) != 0) + goto fail; + + /* Entry 2: avro.schema */ + if (avro_raw_write_string(fp, "avro.schema") != 0) goto fail; + if (avro_raw_write_bytes(fp, schemaJson, (int64_t)strlen(schemaJson)) != 0) + goto fail; + + /* End of map */ + if (avro_zigzag_write_long(fp, 0) != 0) goto fail; + + /* Sync marker: 16 random bytes */ + for (int i = 0; i < 16; i++) { + syncOut[i] = (uint8_t)(rand() & 0xFF); + } + if (fwrite(syncOut, 1, 16, fp) != 16) goto fail; + + fclose(fp); + return 0; + +fail: + errorPrint("Failed to write avro header for: %s\n", path); + fclose(fp); + remove(path); + return -1; +} + avro_value_iface_t* prepareAvroWface( const char *avroFilename, char *jsonSchema, @@ -2163,12 +2407,42 @@ avro_value_iface_t* prepareAvroWface( exit(EXIT_FAILURE); } - int rval = avro_file_writer_create_with_codec - (avroFilename, *schema, writer, g_avro_codec[g_args.avro_codec], 70*1024); - if (rval) { - errorPrint("There was an error creating %s. reason: %s\n", - avroFilename, avro_strerror()); - exit(EXIT_FAILURE); + int rval; + size_t schemaLen = strlen(jsonSchema); + + if (schemaLen >= 60 * 1024) { + /* + * Schema JSON exceeds avro-c's internal 64KB schema_buf. + * Bypass avro_file_writer_create_with_codec() by manually + * writing the avro file header, then open in append mode. + */ + infoPrint("Schema length %zu bytes exceeds 60KB, " + "writing avro header manually for: %s\n", + schemaLen, avroFilename); + uint8_t sync[16]; + const char *codecName = g_avro_codec[g_args.avro_codec]; + if (writeAvroHeaderRaw(avroFilename, jsonSchema, + codecName, sync) != 0) { + errorPrint("There was an error creating %s header\n", + avroFilename); + exit(EXIT_FAILURE); + } + + rval = avro_file_writer_open_bs(avroFilename, writer, 512*1024); + if (rval) { + errorPrint("There was an error opening %s for append. reason: %s\n", + avroFilename, avro_strerror()); + remove(avroFilename); + exit(EXIT_FAILURE); + } + } else { + rval = avro_file_writer_create_with_codec + (avroFilename, *schema, writer, g_avro_codec[g_args.avro_codec], 512*1024); + if (rval) { + errorPrint("There was an error creating %s. reason: %s\n", + avroFilename, avro_strerror()); + exit(EXIT_FAILURE); + } } avro_value_iface_t* wface = @@ -3721,40 +3995,50 @@ static int32_t dumpInAvroTagBinary(FieldStruct *field, avro_value_t *value, avro_value_get_current_branch( value, &branch); - char *buf = NULL; - size_t bin_size; - - avro_value_get_string(&branch, - (const char **)&buf, &bin_size); - - if (NULL == buf) { + if (0 == avro_value_get_null(&branch)) { debugPrint2("%s | ", "NULL"); curr_sqlstr_len += sprintf( sqlstr+curr_sqlstr_len, "NULL,"); } else { - debugPrint2("%s | ", (char *)buf); - curr_sqlstr_len += appendValues(sqlstr + curr_sqlstr_len, buf); + char *buf = NULL; + size_t bin_size; + + avro_value_get_string(&branch, + (const char **)&buf, &bin_size); + + if (NULL == buf) { + debugPrint2("%s | ", "NULL"); + curr_sqlstr_len += sprintf( + sqlstr+curr_sqlstr_len, "NULL,"); + } else { + debugPrint2("%s | ", (char *)buf); + curr_sqlstr_len += appendValues(sqlstr + curr_sqlstr_len, buf); + } } return curr_sqlstr_len; } static int32_t dumpInAvroTagNChar(FieldStruct *field, avro_value_t *value, char *sqlstr, int32_t curr_sqlstr_len) { - size_t bytessize; - void *bytesbuf = NULL; - avro_value_t nchar_branch; avro_value_get_current_branch(value, &nchar_branch); - avro_value_get_bytes(&nchar_branch, - (const void **)&bytesbuf, &bytessize); - - if (NULL == bytesbuf) { + if (0 == avro_value_get_null(&nchar_branch)) { debugPrint2("%s | ", "NULL"); curr_sqlstr_len += sprintf(sqlstr+curr_sqlstr_len, "NULL,"); } else { - debugPrint2("%s | ", (char *)bytesbuf); - curr_sqlstr_len += appendValues(sqlstr + curr_sqlstr_len, (char *)bytesbuf); + size_t bytessize; + void *bytesbuf = NULL; + avro_value_get_bytes(&nchar_branch, + (const void **)&bytesbuf, &bytessize); + + if (NULL == bytesbuf) { + debugPrint2("%s | ", "NULL"); + curr_sqlstr_len += sprintf(sqlstr+curr_sqlstr_len, "NULL,"); + } else { + debugPrint2("%s | ", (char *)bytesbuf); + curr_sqlstr_len += appendValues(sqlstr + curr_sqlstr_len, (char *)bytesbuf); + } } return curr_sqlstr_len; } @@ -4820,21 +5104,27 @@ static void dumpInAvroDataBytes(FieldStruct *field, avro_value_t *value, TAOS_MULTI_BIND *bind, char *is_null) { - size_t bytessize = 0; - void *bytesbuf = NULL; - avro_value_t branch; avro_value_get_current_branch(value, &branch); - avro_value_get_bytes(&branch, (const void **)&bytesbuf, &bytessize); - if (NULL == bytesbuf || bytessize == 0) { + if (0 == avro_value_get_null(&branch)) { debugPrint2("%s | ", "NULL"); bind->is_null = is_null; } else { - debugPrint2("bytes len =%ld | ", bytessize); - bind->buffer_length = bytessize; + size_t bytessize = 0; + void *bytesbuf = NULL; + + avro_value_get_bytes(&branch, (const void **)&bytesbuf, &bytessize); + if (NULL == bytesbuf) { + debugPrint2("%s | ", "NULL"); + bind->is_null = is_null; + } else { + debugPrint2("bytes len =%ld | ", bytessize); + if (bind->length) *bind->length = (int32_t)bytessize; + bind->buffer_length = (int32_t)bytessize; + bind->buffer = bytesbuf; + } } - bind->buffer = bytesbuf; } static void dumpInAvroDataBinary(FieldStruct *field, @@ -4844,18 +5134,25 @@ static void dumpInAvroDataBinary(FieldStruct *field, avro_value_t branch; avro_value_get_current_branch(value, &branch); - char *buf = NULL; - size_t size; - avro_value_get_string(&branch, (const char **)&buf, &size); - - if (NULL == buf || size == 0) { + if (0 == avro_value_get_null(&branch)) { debugPrint2("%s | ", "NULL"); bind->is_null = is_null; } else { - debugPrint2("%s | ", (char *)buf); - bind->buffer_length = strlen(buf); + char *buf = NULL; + size_t size; + avro_value_get_string(&branch, (const char **)&buf, &size); + + if (NULL == buf || size == 0) { + debugPrint2("%s | ", "NULL"); + bind->is_null = is_null; + } else { + debugPrint2("%s | ", (char *)buf); + if (size > 0 && buf[size - 1] == '\0') size -= 1; + if (bind->length) *bind->length = (int32_t)size; + bind->buffer_length = (int32_t)size; + bind->buffer = buf; + } } - bind->buffer = buf; } static void dumpInAvroDataDouble(FieldStruct *field,