Skip to content

Commit 3a2904c

Browse files
committed
Add testing for ALIAS and EPHEMERAL as well
1 parent 4be93d0 commit 3a2904c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

client-v2/src/test/java/com/clickhouse/client/insert/InsertTests.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -564,17 +564,20 @@ public void testWriterWithMaterialize() throws Exception {
564564
" attrs Nullable(String), " +
565565
" corrected_time DateTime('UTC') DEFAULT now()," +
566566
" special_attr Nullable(Int8) DEFAULT -1," +
567-
" name_lower String MATERIALIZED lower(name)" +
567+
" name_lower String MATERIALIZED lower(name)," +
568+
" name_lower_alias String ALIAS lower(name)," +
569+
" unhexed String EPHEMERAL," +
570+
" hexed FixedString(4) DEFAULT unhex(unhexed)" +
568571
" ) Engine = MergeTree ORDER by (name)";
569572

570573
initTable(tableName, tableCreate);
571574

572575
ZonedDateTime correctedTime = Instant.now().atZone(ZoneId.of("UTC"));
573576
Object[][] rows = new Object[][] {
574-
{"foo1", 0.3f, 0.6f, "a=1,b=2,c=5", correctedTime, 10},
575-
{"foo2", 0.6f, 0.1f, "a=1,b=2,c=5", correctedTime, null},
576-
{"foo3", 0.7f, 0.4f, "a=1,b=2,c=5", null, null},
577-
{"foo4", 0.8f, 0.5f, null, null, null},
577+
{"foo1", 0.3f, 0.6f, "a=1,b=2,c=5", correctedTime, 10, "Z��"},
578+
{"foo2", 0.6f, 0.1f, "a=1,b=2,c=5", correctedTime, null, "Z��"},
579+
{"foo3", 0.7f, 0.4f, "a=1,b=2,c=5", null, null, "Z��"},
580+
{"foo4", 0.8f, 0.5f, null, null, null, "Z��"},
578581
};
579582

580583
TableSchema schema = client.getTableSchema(tableName);

0 commit comments

Comments
 (0)