Skip to content

Commit 20b15ce

Browse files
committed
AJ-448:add test case about addColumn
1 parent d0c3fd3 commit 20b15ce

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

test/com/xxdb/data/BasicTableTest.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,19 @@ public void Test_BasicTable_addColumn_DECIMAL128() throws Exception {
10701070
assertEquals("[,9999999999.399999999999999999,-99999999999999.999999900000000000]",bt.getColumn(1).getString());
10711071
}
10721072
@Test
1073+
public void Test_BasicTable_addColumn_void() throws Exception {
1074+
DBConnection conn = new DBConnection(false, false, false);
1075+
conn.connect(HOST, PORT, "admin", "123456");
1076+
BasicTable bt = (BasicTable) conn.run("t = table(1 2 3 as int1);select * from t");
1077+
System.out.println(bt.getString());
1078+
BasicVoidVector bbv = new BasicVoidVector(3);
1079+
bbv.setNull(0);
1080+
System.out.println(bbv.getString());
1081+
bt.addColumn("col1", bbv);
1082+
System.out.println(bt.getString());
1083+
assertEquals("[,,]",bt.getColumn(1).getString());
1084+
}
1085+
@Test
10731086
public void Test_BasicTable_addColumn_BOOL_array() throws Exception {
10741087
DBConnection conn = new DBConnection(false, false, false);
10751088
conn.connect(HOST, PORT, "admin", "123456");
@@ -1497,20 +1510,4 @@ public void Test_BasicTable_addColumn_DECIMAL128_array() throws Exception {
14971510
System.out.println(bt.getString());
14981511
assertEquals("[[],[9999999999.399999999999999999,-99999999999999.999999900000000000]]",bt.getColumn(1).getString());
14991512
}
1500-
1501-
1502-
1503-
1504-
1505-
1506-
1507-
1508-
1509-
1510-
1511-
1512-
1513-
1514-
1515-
15161513
}

0 commit comments

Comments
 (0)