MoanasDaddyXu opened a new issue, #65976:
URL: https://github.com/apache/doris/issues/65976

   ### Tracking
   
   - Tracking issue: #65265
   - Internal reference: DORIS-27442
   
   ### Search before asking
   
   - [x] I searched the existing issues and found no issue with the same 
ROW-binlog table-stream failure.
   - [x] #52252 concerns missing or unstable results when querying a regular 
table; this issue instead fails during an `APPEND_ONLY` table-stream query with 
`NOT_IMPLEMENTED_ERROR`.
   
   ### 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:
   
   ```text
   [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?
   
   ```sql
   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:
   
   ```text
   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?
   
   - [ ] Yes, I am willing to submit a PR!
   


-- 
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]

Reply via email to