StarRocks UDAF returns empty result
I tried the SumInt UDAF on
docs.starrocks.io/docs/sql-reference/sql-functions/JAVA_UDF
when I run it, I got empty result even the table has data. see below
CREATE TABLE t1 (id INT, m MAP
BIGINT,BIGINT);
INSERT INTO t1 VALUES
(1, map{1:10, 2:20}),
(2, map{2:5, 3:30}),
(3, map{1:1});
select SUM_INT(id) from t1;
+-------------+
| sum_int(id) |
+-------------+
| 0 |
+-------------+
but if run SET new_planner_agg_stage = 1; first then run the UDF, I got result
SET new_planner_agg_stage = 1;
select SUM_INT(id) from t1;
+-------------+
| sum_int(id) |
+-------------+
| 6 |
+-------------+
when I looked into the be log , it has the following exception:
be.INFO
2815216W20261027 23
0919.114663 128550699832896 java_udf.cpp:379] batch_create_bytebuf,java.lang.NoSuchMethodException: java.nio.DirectByteBuffer.
init(long,int)
My StarRocks version is 4.0.10-5b36164 and Java version is v21
If I run the same UDF on StarRocks 4.0.10-5b36164 with Java v17, the UDF has the right result.
Is there some issues with StarRocks v4.0.10 and Java v21 for UDF?