Skip to content

scalar function reverse is not compatible with Spark #2612

@andygrove

Description

@andygrove

Describe the bug

I don't have a simple repro yet, but I found a bug while experimenting with some fuzz testing.

The query was select c0, reverse(c0) FROM t1 ORDER BY c0.

Two of the result mismatches were:

== Results ==
!== Correct Answer - 1000 ==                                                                                                         == Spark Answer - 1000 ==
 struct<c29:array<binary>,reverse(c29):array<binary>>                                                                                struct<c29:array<binary>,reverse(c29):array<binary>>
![ArrayBuffer(null),ArrayBuffer(null)]                                                                                               [ArrayBuffer(null),ArrayBuffer([B@1814c14)]
![ArrayBuffer(null, null),ArrayBuffer(null, null)]                                                                                   [ArrayBuffer(null, null),ArrayBuffer([B@589e926b, [B@6aaa0ef7)]

Perhaps we are creating an empty array instead of null, but it is hard to tell because the output here does not show the contents of the byte array.

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions