Tracking
Search before asking
Version
Reproduced on Doris commit a8b1fd95e2a.
What's Wrong?
Calling array_agg_foreach on an APPEND_ONLY table stream backed by ROW binlog fails during query execution:
[NOT_IMPLEMENTED_ERROR]array_agg not support write
The equivalent aggregation over the base table produces a result. The failure is specific to querying the table stream and also affects nested array input.
What You Expected?
array_agg_foreach should execute on the ROW-binlog table stream and return results with the same semantics as the corresponding base-table query.
How to Reproduce?
DROP DATABASE IF EXISTS array_agg_stream_repro;
CREATE DATABASE array_agg_stream_repro;
USE array_agg_stream_repro;
CREATE TABLE foreach_table (
id INT,
a ARRAY<INT>,
b ARRAY<ARRAY<INT>>
)
DUPLICATE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 1
PROPERTIES (
"replication_num" = "1",
"binlog.enable" = "true",
"binlog.format" = "ROW"
);
CREATE STREAM foreach_table_stream ON TABLE foreach_table
PROPERTIES ("type" = "append_only");
INSERT INTO foreach_table VALUES
(1, [1, 2, 3], [[1], [1, 2, 3], [2]]),
(2, [20], [[2]]),
(3, [100], [[1]]),
(4, NULL, [NULL]),
(5, [NULL, 2], [[2], NULL]);
-- The equivalent query on foreach_table succeeds.
SELECT array_agg_foreach(a) FROM foreach_table_stream;
SELECT /*+ SET_VAR(parallel_pipeline_task_num=1) */
size(array_agg_foreach(b)),
size(element_at(array_agg_foreach(b), 1)),
size(element_at(array_agg_foreach(b), 2)),
size(element_at(array_agg_foreach(b), 3))
FROM foreach_table_stream;
Both table-stream queries fail with the error above.
be.out
The following excerpt contains only the relevant, sanitized BE output:
Pipeline task failed. reason: [NOT_IMPLEMENTED_ERROR]array_agg not support write
report error status: array_agg not support write to coordinator
Impact
Queries that use array_agg_foreach cannot run against APPEND_ONLY table streams, blocking incremental-processing workloads that aggregate array columns.
Are you willing to submit PR?
Tracking
Search before asking
APPEND_ONLYtable-stream query withNOT_IMPLEMENTED_ERROR.Version
Reproduced on Doris commit
a8b1fd95e2a.What's Wrong?
Calling
array_agg_foreachon anAPPEND_ONLYtable stream backed by ROW binlog fails during query execution:The equivalent aggregation over the base table produces a result. The failure is specific to querying the table stream and also affects nested array input.
What You Expected?
array_agg_foreachshould execute on the ROW-binlog table stream and return results with the same semantics as the corresponding base-table query.How to Reproduce?
Both table-stream queries fail with the error above.
be.out
The following excerpt contains only the relevant, sanitized BE output:
Impact
Queries that use
array_agg_foreachcannot run againstAPPEND_ONLYtable streams, blocking incremental-processing workloads that aggregate array columns.Are you willing to submit PR?