WIP: Starting point for optimizer integration tests
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
@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.
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 that sounds great. Thank you.
@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)
I needed this style of integration test in https://github.com/apache/arrow-datafusion/pull/3229 so made the changes in that PR instead.