-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Auto-update mechanism for dataframe test #10373
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
Comments
Something we have used to great effect in influxdb is https://insta.rs/ You can then do the equivalent of cargo insta review Some downsides are that it is is yet another dependency (and to use it you need to install |
I think this might be another approach, and we use it in databend. https://crates.io/crates/goldenfile
If we decide to use a specific approach, I think I can try to take this issue. |
We could give it a try! The goal of this issue is to fix #10364 . I stalled on the progress because #10364 is not a high priority issue (we can easily add alias to avoid the issue + it is probably solved in #11020), and since |
I think goldenfile can fulfill this requirement. I'll create some examples and submit a PR for evaluation. If everything works well, we can proceed with migrating the dataframe tests and examples. Please assign me this issue. cc @alamb @jayzhan211 |
Thanks @PsiACE and @jayzhan211 |
Outside of sqllogictests which already has an auto-update (see the I see this PR for insta with cli integration tests. Do we want to start introducing insta to core? |
I personally support introducing |
I agree! And moreover, we'll be able to split "harness" (set up context, register files) from the actual test logic (stored in the small atomic snapshots files). Happy to work on that if we take the |
I think this could be a good approach for dataframe testing. The existing assert_batches_eq!/assert_batches_sorted_eq! macro is nice but they do how the downside of requiring manual updates for changes. |
I just merged I think it would be pretty cool to migrate a few tests to be |
what do you think about #15165 |
It is amazing😍 t- I recommend others check it out! |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem or challenge?
While working on #10364, I found that changing the result in the rust test is quite painful.
Currently, we need to fix the string manually one by one
It would be nice if there is an easy way to update the test.
In sqllogictest, we can easily done it with
--complete
flag.Describe the solution you'd like
Given the test, having a very easy way to auto-update result string
Approach 1
One possible solution is writing the result to the file, and comparing it with similar to
sqllogictest
, but since we need to callexpr
API, the API calls remain in the rust test, and only the output goes tooutput file
.Approach 2
Based on #8736
We can switch between SQL string and
Expr
and compare the result likesqllogictest
doesrun_query
may be likeDescribe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: