-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Add expression wrapper to ExprBuilder #73
Conversation
…cts as function arguments.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
=======================================
Coverage 58.28% 58.28%
=======================================
Files 43 43
Lines 9130 9132 +2
=======================================
+ Hits 5321 5323 +2
Misses 3565 3565
Partials 244 244 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Just one nit-pick but overall this looks good to me!
expr/builder_test.go
Outdated
@@ -17,6 +17,7 @@ func TestExprBuilder(t *testing.T) { | |||
Reg: expr.NewEmptyExtensionRegistry(&extensions.DefaultCollection), | |||
BaseSchema: &boringSchema.Struct, | |||
} | |||
precomputedExpression, _ := expr.NewLiteral(int32(3), false) |
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.
should we use examples that aren't Literals since wrap methods and such for literals, such as using the builder to create an expression first and then using that expression later, etc.
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.
I was pondering merging Wrap and WrapExpression into Wrap (with the functionality of WrapExpression) since they are essentially the same.
I will also add a non-literal Expression example.
Looks great, thanks @EpsilonPrime! |
This will allow previously calcuated Expression objects to be used as function arguments.