Skip to content

[Bug]: GROUP_CONCAT fails for DECIMAL256, YEAR, UUID, GEOMETRY and GEOMETRY32 #27589

Closed

Description

@Ariznawlll

Description

GROUP_CONCAT accepts DECIMAL256, YEAR, UUID, GEOMETRY, and
GEOMETRY32 during planning, but every type fails at execution with an internal
unsupported-payload error. The same statement works for ordinary text and
DECIMAL(38,4) controls.

Environment

  • Branch: main
  • Commit: e866c535f5723fca6a8522c8338f7277e4b9e40f
  • Deployment: local mo-service, 1 Log / 1 TN / 1 CN, fresh temporary data directory
  • Test date: 2026-08-25

Steps to reproduce

create table t (
  id int primary key,
  control_text varchar(16),
  control_decimal decimal(38,4),
  d256 decimal(40,4),
  y year,
  u uuid,
  g geometry,
  g32 geometry32
);
insert into t values
  (1, 'a', 1.2500, 123456789012345678901234567890123456.5678, 2024,
   '00000000-0000-0000-0000-000000000001', st_geomfromtext('POINT(1 2)'), cast(st_geomfromtext('POINT(3 4)') as geometry32)),
  (2, 'b', 2.5000, 223456789012345678901234567890123456.5678, 2025,
   '00000000-0000-0000-0000-000000000002', st_geomfromtext('POINT(5 6)'), cast(st_geomfromtext('POINT(7 8)') as geometry32));

select group_concat(control_text order by id separator '|') from t;
select group_concat(control_decimal order by id separator '|') from t;
select group_concat(d256 order by id separator '|') from t;
select group_concat(y order by id separator '|') from t;
select group_concat(u order by id separator '|') from t;
select group_concat(g order by id separator '|') from t;
select group_concat(g32 order by id separator '|') from t;

Actual behavior

The controls return a|b and 1.2500|2.5000. Each target type fails:

internal error: unsupported type for group_concat payload: DECIMAL256
internal error: unsupported type for group_concat payload: YEAR
internal error: unsupported type for group_concat payload: UUID
internal error: unsupported type for group_concat payload: GEOMETRY
internal error: unsupported type for group_concat payload: GEOMETRY32

Expected behavior

Every type accepted by GROUP_CONCAT should have a deterministic SQL-level
serialization consistent with the function's text/binary result contract. If a
type is intentionally unsupported, planning should reject it with a normal
unsupported-function error rather than allowing execution to fail with an
internal error.

Stability and controls

  • The minimal reproducer failed identically in 3/3 executions on the commit above.
  • VARCHAR and DECIMAL(38,4) controls passed in every run.
  • All five failures are statement-local; a following SELECT 1 succeeded and the
    local service stayed healthy.
  • Existing vector coverage treats raw bytes as the established contract through
    HEX(GROUP_CONCAT(vector_col)); vectors are not included in this report.
  • No matching open or closed issue was found by searching the exact error and the
    function/type combination.

Code analysis

The planner delegates type admission to
IsGroupConcatSupported,
which rejects only T_tuple. The execution serializer in
writeGroupConcatData
has no cases for the five OIDs above and reaches its internal-error default.

Regression coverage

After the fix, add a BVT case under
test/distributed/cases/function/function_group_concat.sql covering each type
with deterministic ordered output, together with a normal text/decimal control.
The scope is stable public SQL, so it does not require big-data or chaos coverage.

Activity

  1. added this to the MO-202608 milestone on Aug 25, 2026
  2. added
    kind/bug
    on Aug 25, 2026
  3. added a commit that references this issue on Aug 27, 2026
    6abbbce
  4. reopened this on Sep 4, 2026
  5. Ariznawlll commented on Sep 4, 2026

    @Ariznawlll
    CollaboratorAuthor

    验证结论(最新 main):

    • 基线:MatrixOne main e6b25ee7726596514f520925815692c1a44031e1,129 TKE,3 CN + 1 DN + 3 Log + 2 Proxy;2026-09-04。
    • Happy case:GROUP_CONCAT 覆盖 DECIMAL256、YEAR、UUID、GEOMETRY、GEOMETRY32,3 轮均成功返回完整值;DECIMAL 精度、YEAR/UUID 文本和两类 geometry 的 HEX 均稳定一致。
    • Unhappy/control:聚合后继续执行 session health 查询返回 1;无 internal error、panic 或数据丢失。
    • MOTR:已加入 PR #143 的 issue_27589_group_concat_types,并行执行,3/3 成功。
    • 不需要 big-data、PITR、snapshot、stability 或 chaos;类型序列化覆盖是确定性的函数语义,不受数据规模影响。

    测试通过。

  6. added 3 commits that reference this issue on Sep 17, 2026
    51a1265
    9a59fe5
    2695482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugphase/testing

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions