cambyzju commented on issue #15593:
URL: https://github.com/apache/doris/issues/15593#issuecomment-1374825335
simple way to reproduce:
1. create table:
```
CREATE TABLE `s6275_olumn_func_test_replace_if_not_null_with_rollup_tb_s` (
`k1` bigint(20) NULL,
`k2` bigint(20) NULL,
`v1` tinyint(4) SUM NULL,
`v2` tinyint(4) REPLACE NULL,
`v3` tinyint(4) REPLACE_IF_NOT_NULL NULL,
`v4` smallint(6) REPLACE_IF_NOT_NULL NULL,
`v5` int(11) REPLACE_IF_NOT_NULL NULL,
`v6` bigint(20) REPLACE_IF_NOT_NULL NULL,
`v7` largeint(40) REPLACE_IF_NOT_NULL NULL,
`v8` datetime REPLACE_IF_NOT_NULL NULL,
`v9` date REPLACE_IF_NOT_NULL NULL,
`v10` char(10) REPLACE_IF_NOT_NULL NULL,
`v11` varchar(6) REPLACE_IF_NOT_NULL NULL,
`v12` decimal(27, 9) REPLACE_IF_NOT_NULL NULL
) ENGINE=OLAP
AGGREGATE KEY(`k1`, `k2`)
COMMENT 'OLAP'
PARTITION BY RANGE(`k1`)
(PARTITION partition_a VALUES [("-9223372036854775808"), ("100000")),
PARTITION partition_b VALUES [("100000"), ("1000000000")),
PARTITION partition_c VALUES [("1000000000"), ("10000000000")),
PARTITION partition_d VALUES [("10000000000"), (MAXVALUE)))
DISTRIBUTED BY HASH(`k1`, `k2`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
);
```
2. add some data:
`insert into s6275_olumn_func_test_replace_if_not_null_with_rollup_tb_s
values(1,2,1,2,3,4,5,6,"7",8,"2022-10-10","11",null,1.1);`
3. trigger linked schema change:
`ALTER TABLE s6275_olumn_func_test_replace_if_not_null_with_rollup_tb_s ADD
ROLLUP sc038_mn_func_test_replace_if_not_null_with_rollup_index_s
(k1,k2,v10,v11);`
4. query by rollup:
`select k1,k2,v10,v11 from
s6275_olumn_func_test_replace_if_not_null_with_rollup_tb_s;`
The problem is:
1. Column UniqueId not the same inside base table and rollup;
2. We use linked schema change, the segment file footer save columns and
unique ids of base table;
3. While we query with rollup, we use rollup column unique id to find column
inside segment file, the column type is not correct;
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]