Skip to content

[BUG] DataFusion regression in optimizer related to casting #844

@andygrove

Description

@andygrove

What happened:

After upgrading to DataFusion 13.0.0-rc1 in #825 we see a regression in the query plan optimization for the filter expression foo between '1998-03-18' and (cast('1998-03-18' as date) + INTERVAL '90 days'), where foo is a string column.

Before

Filter: #foo BETWEEN Utf8("2001-03-09") AND Utf8("2001-06-07")

After

Filter: foo BETWEEN Utf8("2001-03-09") AND CAST(CAST(Utf8("2001-03-09") AS Date32) + IntervalDayTime("386547056640") AS Utf8)

What you expected to happen:

I preferred the original behavior.

Minimal Complete Verifiable Example:

TBD - I am working on a repro for this

# Put your MCVE code here

Anything else we need to know?:

Environment:

  • dask-sql version:
  • Python version:
  • Operating System:
  • Install method (conda, pip, source):

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdatafusionRelated to work in DataFusionneeds triageAwaiting triage by a dask-sql maintainer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions