Skip to content

Regression in last_value functionality #15676

@andygrove

Description

@andygrove

Describe the bug

In the Comet subproject, we have a PR where we are upgrading to use the latest DataFusion revision from main in preparation for upgrading to DataFusion 47 (apache/datafusion-comet#1563).

After bumping the revision to b22e4d26480202247022bf2c94ba629a07e3275b, we see some tests start to fail, such as:

multiple group-by columns + single aggregate column, with nulls

2025-04-10T17:13:49.0990050Z   == Results ==
2025-04-10T17:13:49.0990580Z   !== Correct Answer - 2 ==                        == Spark Answer - 2 ==
2025-04-10T17:13:49.0991090Z    struct<_g1:tinyint,_g2:smallint,last(_3):int>   struct<_g1:tinyint,_g2:smallint,last(_3):int>
2025-04-10T17:13:49.0991750Z    [null,null,null]                                [null,null,null]
2025-04-10T17:13:49.0992100Z   ![0,0,9]                                         [0,0,0] (QueryTest.scala:244)

It is also possible that the error is due to other changes in Comet and not related to DataFusion. I will update this issue once I know more.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions