Skip to content

Group by rollup/cube/etc.. fails with new type_coercion #25890

Closed

Description

@cetra3

Describe the bug

#23232 introduced some changes that broke some query shapes inadvertently.

To Reproduce

Using datafusion cli:

CREATE TABLE t (ts TIMESTAMP, calls BIGINT) AS VALUES
 ('1970-01-01T00:00:00'::timestamp, 1),
 ('1970-01-01T00:01:00'::timestamp, 2),
 ('1970-01-01T00:05:00'::timestamp, 4);

SELECT date_bin('5 minutes', ts) AS bucket, SUM(calls)
FROM t GROUP BY ROLLUP(bucket) ORDER BY bucket NULLS FIRST;

You will get the error:

No field named "date_bin(Utf8(""5 minutes""),t.ts)". Did you mean '"ROLLUP (date_bin(Utf8(""5 minutes""),t.ts))"'

Expected behavior

This query runs and returns appropriately

Additional context

No response

Activity

  1. added theissue type on Sep 30, 2026
  2. added a commit that references this issue on Sep 30, 2026
    e36da75
  3. added a commit that references this issue on Oct 13, 2026
    e4deabb
  4. added a commit that references this issue on Oct 13, 2026
    bfab4a2
  5. added a commit that references this issue on Oct 14, 2026
    0566b55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions