From 370c175bbe3f6dbfec82f1f869409d51454cd3cf Mon Sep 17 00:00:00 2001 From: amorynan Date: Thu, 12 Dec 2024 11:00:32 +0800 Subject: [PATCH] fix case --- .../data/datatype_p0/ip/test_ip_basic.out | 15 ++++++--------- .../suites/datatype_p0/ip/test_ip_basic.groovy | 9 ++++++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/regression-test/data/datatype_p0/ip/test_ip_basic.out b/regression-test/data/datatype_p0/ip/test_ip_basic.out index 785bfc36a74129..e1b85abe00c41b 100644 --- a/regression-test/data/datatype_p0/ip/test_ip_basic.out +++ b/regression-test/data/datatype_p0/ip/test_ip_basic.out @@ -378,17 +378,14 @@ ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 4 2 :: 127.0.0.1 -- !sql -- -table_ip_default CREATE TABLE `table_ip_default` (\n `col0` bigint NOT NULL,\n `col4` ipv6 NULL DEFAULT "::",\n `col24` ipv4 NULL DEFAULT "127.0.0.1"\n) ENGINE=OLAP\nUNIQUE KEY(`col0`)\nDISTRIBUTED BY HASH(`col0`) BUCKETS 4\nPROPERTIES (\n"replication_allocation" = "tag.location.default: 1",\n"min_load_replica_num" = "-1",\n"is_being_synced" = "false",\n"storage_medium" = "hdd",\n"storage_format" = "V2",\n"inverted_index_storage_format" = "V2",\n"enable_unique_key_merge_on_write" = "true",\n"light_schema_change" = "true",\n"disable_auto_compaction" = "false",\n"binlog.enable" = "false",\n"binlog.ttl_seconds" = "86400",\n"binlog.max_bytes" = "9223372036854775807",\n"binlog.max_history_nums" = "9223372036854775807",\n"enable_single_replica_compaction" = "false",\n"group_commit_interval_ms" = "10000",\n"group_commit_data_bytes" = "134217728",\n"enable_mow_light_delete" = "false"\n); +table_ip_default UNIQUE_KEYS col0 bigint bigint No true \N true + col4 ipv6 ipv6 Yes false :: NONE true + col24 ipv4 ipv4 Yes false 127.0.0.1 NONE true -- !sql -- -col0 bigint No true \N -col4 ipv6 Yes false :: NONE -col24 ipv4 Yes false 127.0.0.1 NONE - --- !sql -- -col0 bigint No true \N -col4 ipv6 Yes false :: NONE -col24 ipv4 Yes false 127.0.0.1 NONE +table_ip_default_like UNIQUE_KEYS col0 bigint bigint No true \N true + col4 ipv6 ipv6 Yes false :: NONE true + col24 ipv4 ipv4 Yes false 127.0.0.1 NONE true -- !sql -- 2 diff --git a/regression-test/suites/datatype_p0/ip/test_ip_basic.groovy b/regression-test/suites/datatype_p0/ip/test_ip_basic.groovy index d6ab3724d697e4..5a4ab2ca94aca9 100644 --- a/regression-test/suites/datatype_p0/ip/test_ip_basic.groovy +++ b/regression-test/suites/datatype_p0/ip/test_ip_basic.groovy @@ -173,11 +173,14 @@ suite("test_ip_basic") { // create table like // insert into table // alter new ip column with default value - qt_sql """ show create table table_ip_default """ - qt_sql """ desc table_ip_default """ + def result = sql """ show create table table_ip_default """ + log.info("show result : ${result}") + assertTrue(result.toString().containsIgnoreCase("`col4` ipv6 NULL DEFAULT \"::\"")) + assertTrue(result.toString().containsIgnoreCase("`col24` ipv4 NULL DEFAULT \"127.0.0.1\"")) + qt_sql """ desc table_ip_default all""" sql """ DROP TABLE IF EXISTS table_ip_default_like """ sql """ create table table_ip_default_like like table_ip_default """ - qt_sql """ desc table_ip_default_like""" + qt_sql """ desc table_ip_default_like all""" qt_sql """ insert into table_ip_default_like select * from table_ip_default """ qt_sql """ select * from table_ip_default_like order by col0 """ qt_sql """ alter table table_ip_default_like add column col25 ipv6 NULL DEFAULT "::" """