Closed only2yangcao closed 2 years ago
addr2line -e ./starrocks_be 0x5487c5f 0x57194dc 0x1eba748 0x5669755 0x1922eb8 0x22da2d8 0x1d9ceff 0x3175c16 0x316772b 0x3d7afcc 0x3d7bd98 0x1f5b959 0x1f5750a 0x7f38fc1bddd5
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1338
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1357
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/service/mem_hook.cpp:232
/var/local/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/../../.././libstdc++-v3/libsupc++/new_op.cc:50
/usr/include/c++/10.3.0/bits/stl_vector.h:1169
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/column/nullable_column.cpp:82
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/memtable.cpp:93
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/delta_writer.cpp:201
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/common/status.h:36
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:272
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:151
/usr/include/c++/10.3.0/bits/shared_ptr_base.h:732
/usr/include/pthread.h:555
addr2line -e ./starrocks_be 0x5487c5f 0x57194dc 0x1eba748 0x5669755 0x1922eb8 0x22da2d8 0x22cfb47 0x1d9c0d3
0x1d9c8dd 0x3175723 0x3175e9d 0x316772b 0x3d7afcc 0x3d7bd98 0x1f5b959 0x1f5750a 0x7f38fc1bddd5
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1338
/var/local/thirdparty/src/gperftools-gperftools-2.7/src/tcmalloc.cc:1357
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/service/mem_hook.cpp:232
/var/local/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/../../.././libstdc++-v3/libsupc++/new_op.cc:50
/usr/include/c++/10.3.0/bits/stl_vector.h:1169
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/column/nullable_column.cpp:82
/usr/include/c++/10.3.0/bits/stl_vector.h:1046 (discriminator 2)
/usr/include/c++/10.3.0/bits/shared_ptr_base.h:761
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/memtable.cpp:181
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/storage/vectorized/delta_writer.cpp:239
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/common/status.h:36
/data1/compile/starrocks-2.1/yangcao/starrocks-inner-version/be/src/common/status.h:36
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:272
/var/local/thirdparty/src/incubator-brpc-0.9.7/src/bthread/execution_queue.cpp:151
/usr/include/c++/10.3.0/bits/shared_ptr_base.h:732
/usr/include/pthread.h:555
How to reproduce
create table l1 like lineorder;
insert into l1 select * from lineorder;
insert into l1 select * from lineorder;
insert into l1 select * from lineorder;
insert into l1 select * from lineorder;
CREATE TABLE `t2` (
`c1` varchar(65533) NULL COMMENT "",
`c2` varchar(65533) NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`c1`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`c1`) BUCKETS 500
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);
mysql> select count(*) from l1;
+-----------+
| count(*) |
+-----------+
| 479978432 |
+-----------+
1 row in set (7.04 sec)
CREATE TABLE `t2` (
`c1` varchar(65533) NULL COMMENT "",
`c2` varchar(65533) NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`c1`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`c1`) BUCKETS 500
PROPERTIES (
"replication_num" = "1",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);
insert into t2 select if(lo_quantity=1, lo_shipmode, null), if(lo_quantity=1, repeat(lo_shipmode, 600), null) from l1;
data is wrong
mysql> select count(distinct c1) from t2;
+--------------------+
| count(DISTINCT c1) |
+--------------------+
| 7 |
+--------------------+
1 row in set (1.42 sec)
mysql> select count(distinct c2) from t2;
+--------------------+
| count(DISTINCT c2) |
+--------------------+
| 10 |
+--------------------+
1 row in set (7.08 sec)
tcmalloc: large alloc 7418748928 bytes == 0x906daa000 @ 0x5361a69 0x55ec3dc 0x1eaff38 0x553cc75 0x1918548 0x22cd378 0x1d9276f 0x316c9e6 0x315e0fb 0x3cb2cfc 0x3cb3ac8 0x1f51769 0x1f4d31a 0x7f4d8d65dea5
version: use tag 2.2.0 enable_udf=true
be.out