Skip to content

Simple query fails with column types must match schema types #13534

Closed

Description

@adriangb

Describe the bug

Found in our production system using datafusion internals, but reproducible in datafusion-cli:

SELECT
    'foo' AS text,
    arrow_cast('2024-01-01T00:00:00Z'::timestamptz, 'Timestamp(Microsecond, Some("UTC"))') AS ts
GROUP BY ts, text

Gives:

Arrow error: Invalid argument error: column types must match schema types, expected Timestamp(Microsecond, Some("UTC")) but found Timestamp(Microsecond, None) at column index 0

To Reproduce

No response

Expected behavior

No response

Additional context

I bisected it with this script:

pushd datafusion-cli && cargo run --bin datafusion-cli -- --file ../q.sql && popd

And then:

git checkout c0ca4b4  # current HEAD
git bisect start
git bisect bad
git checkout 88f58bf # 43.0, I manually verified it is okay
git bisect good
git bisect run ./test.sh  # the above script

The result points to ecc04d4 / #13457

Activity

  1. adriangb commented on Nov 22, 2024

    @adriangb
    ContributorAuthor
  2. alamb commented on Nov 23, 2024

    @alamb
    Contributor
  3. added
    regressionSomething that used to work no longer does
    on Nov 23, 2024
  4. alamb commented on Nov 23, 2024

    @alamb
    Contributor

    I think this issue was introduced in

    Which has not been released yet

  5. removed
    regressionSomething that used to work no longer does
    on Nov 23, 2024
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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions