-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve testing of optimizers using EXPLAIN #1118
Comments
@rdettai @Dandandan @alamb |
Sounds great -- thank you @matthewmturner ! Here is another idea with additional thoughts on test cleanup if you are feeling ambitious and want to move code around: #743 In general, I think the idea of consolidating SQL optimizer "end to end" tests that use explain into If you are inspired to do this, I suggest looking through the codebase first and consolidating existing tests into optimizers.rs. For example, there are a bunch of "explain" tests here: I bet you could rewrite them to actually use |
@alamb happy to do this. i'll work on consolidating into One quick question. By using UPDATE Let me know if any thoughts. Thanks! |
I was thinking of using |
Ok makes sense now after i played around with it! For whatever reason I had thought the output of Thanks! |
I believe this is now in place via https://github.com/apache/arrow-datafusion/blob/master/datafusion/optimizer/tests/integration-test.rs |
It would be very reassuring if these optimizations came with a more systematic testing routine. I agree that unit tests in this precise scenario are not very powerful. Currently we have a test here: https://github.com/apache/arrow-datafusion/blob/558d8ecfe2d1b0737de1e2548c5fbedc0ea17ada/datafusion/tests/sql.rs#L3020
that ensures that the count optimizer rule kicks in properly with
EXPLAIN [ANALYZE]
. What do you think about creating a separate integration test file calledoptimizers.rs
that runs SQL queries and checks if they were optimized as expected?Originally posted by @rdettai in #1063 (comment)
The text was updated successfully, but these errors were encountered: