datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

WIP: Starting point for optimizer integration tests

Open andygrove opened this issue 3 years ago • 4 comments

Which issue does this PR close?

Closes https://github.com/apache/arrow-datafusion/issues/2911

Rationale for this change

I would like integration tests in the optimizer crate where we can easily add SQL and expected output plans so we can catch regressions as new rules are added

What changes are included in this PR?

Single integration test as a template to follow

Are there any user-facing changes?

No

andygrove avatar Jul 14 '22 18:07 andygrove

@avantgardnerio This is a very rushed and hacky start, but do you think this could be the basis for useful tests?

I have benchmark SQL that I could add here to expose a number of existing optimizer bugs.

andygrove avatar Jul 14 '22 18:07 andygrove

I would like integration tests in the optimizer crate where we can easily add SQL and expected output plans so we can catch regressions as new rules are added

This would be awesome -- note I have something similar in IOx that has the queries and expected plans in external files (which makes updating them much easier -- you can just copy the new output file and verify the diff).

if you would like I can try and port some of that to datafusion (perhaps after this PR is merged): https://github.com/influxdata/influxdb_iox/tree/main/query_tests

alamb avatar Jul 15 '22 11:07 alamb

@alamb that sounds great. Thank you.

andygrove avatar Jul 26 '22 09:07 andygrove

@alamb that sounds great. Thank you.

I am a bit low on time for the moment -- I will try over the next few weeks (or maybe document / explain better the existing postgres integration test that @Jimexist worked on)

alamb avatar Jul 26 '22 20:07 alamb

I needed this style of integration test in https://github.com/apache/arrow-datafusion/pull/3229 so made the changes in that PR instead.

andygrove avatar Aug 23 '22 13:08 andygrove