-
Couldn't load subscription status.
- Fork 118
test: add derive macro tests #514
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
Conversation
Signed-off-by: Niko <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
=======================================
Coverage 83.28% 83.28%
=======================================
Files 93 93
Lines 22384 22384
Branches 22384 22384
=======================================
Hits 18642 18642
Misses 2786 2786
Partials 956 956 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few questions!
|
I added a second part that fixes an error in macro when fully-qulified multi-part types are used (forgot to push this earlier). Also added a passing docs test to verify, this test needs to be moved to normal test as part of #526 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @r3stl355 are you able to pick this back up? just added a quick comment and would love to have this land :)
Signed-off-by: Niko <[email protected]>
Signed-off-by: Niko <[email protected]>
|
Made a bit of a mess and had to force-push, hope that's alright. Should be good now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Just one simplification left and should be ready for merge
Signed-off-by: Niko <[email protected]>
|
Hmm @zachschuermann it looks like something went wrong with the doctest+internal API combo? I thought we had set the CI to enable internal API while compiling doctests? |
|
Also, strangely, if I run just |
## What changes are proposed in this pull request? With the introduction of `EvaluationHandler::create_one`, we can create `EngineData` now. This PR adds a handy new procedural macro to implement a new `IntoEngineData` trait which allows for `self.into_engine_data(schema, &dyn Engine)` as long as all fields implement `Into<Scalar>` (for now just support the simple case of all-primitive fields) This would typically be used in conjunction with `ToSchema` to provide the schema for the output `EngineData`. ### Future work Need to implement tests (make doctest on `IntoEngineData` trait actually build): lump that in to #514 1. need to rename `crate::` to `delta_kernel::` in macros 2. need to make all the types we need conditionally pub (that is, if `cfg(doctest)` then make stuff `pub`) 3. need to do an `extern crate self as delta_kernel` 4. and finally, make the doctest a `no_run` (building) doctest ## How was this change tested? new UT
|
@zachschuermann where does this one sit with all the recent changes, is it still relevant? I am leaving Databricks so need to keep myself occupied :) |
AFAIK, this is still important. In particular, it adds the ability to create working doctests for derive macros, which other recent PR would benefit from. I'll let @zachschuermann weigh in on whether/how this PR may need to expand tho. |
|
Hi @r3stl355! Yes this is even more relevant after #830 landed :) - see the PR description over there for some overlapping derive macro test work that we need. I opened another issue that basically just links to this PR and my PR: #991 I believe the remaining work would just be to (1) update this PR to work with the original stuff it intended to test and (2) add to this or open a new PR to expand the testing to my new |
|
Cool, thanks @scovich & @zachschuermann, I'll see what I can come up with in the next few days |
|
Hi @zachschuermann, I updated the PR to work with latest changes. I suggest creating a different one for |
|
Hey, these failed checks look unrelated to my changes, is there something I need to do to pass them? |
|
ah yep just need to rebase on current master and should be good to go! I just updated here via github UI and will take a look at this today :) thank you @r3stl355! |
Signed-off-by: Niko Ulmasov <[email protected]>
|
thank you @r3stl355! |
|
Thank you for merging @zachschuermann, I'll start looking into the other macro tests |
What changes are proposed in this pull request?
A simplified version of PR429 (to be closed/abandoned) using a doctest trick.
crate::todelta_kernel::in the generated code.developer-visibilityfeature instead of adding a new one as it seemed to fit the purposejustfileto run the new tests as part of existing testing processHow was this change tested?
All tests pass, including the newly added