splitgraph / seafowl

Analytical database for data-driven Web applications 🪶
https://seafowl.io
Apache License 2.0
426 stars 12 forks source link

Error: Optimizer rule 'push_down_filter' failed #583

Closed mrchypark closed 2 months ago

mrchypark commented 2 months ago

Environment

Error message

Optimizer rule 'push_down_filter' failed
caused by
Internal error: Vec returned length: 1 from supports_filters_pushdown is not the same size as the filters passed, which length is: 3.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker

Query

SELECT SUM(i) FROM data WHERE aid = 'aaaa' AND pid = 'bbbb' AND local_date='2024-07-31'

Additional Information

The columns aid, pid, and local_date are in ordinal positions 0, 1, and 2 respectively.

Steps to Reproduce

  1. Create a table using CREATE TABLE
  2. Insert data into the table
  3. Run the above query

Question

What can I do to resolve this error? Is there a workaround or fix available?

Thank you for your assistance with this issue.

mrchypark commented 2 months ago

when

SELECT SUM(i) FROM data WHERE aid = 'aaaa' AND pid = 'bbbb'

got error

Optimizer rule 'push_down_filter' failed
caused by
Internal error: Vec returned length: 1 from supports_filters_pushdown is not the same size as the filters passed, which length is: 2.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
gruuya commented 2 months ago

Thanks for the report!

I can indeed reproduce the bug with 0.5.7, which stems from a delta-rs bug fixed by https://github.com/delta-io/delta-rs/pull/2604, which we picked up in https://github.com/splitgraph/seafowl/pull/547.

Until 0.5.8 is released you can work around this by using the nightly docker image splitgraph/seafowl:nightly.

mrchypark commented 2 months ago

Thank you for your help!