-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Add expression JSON parser #5602
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
| BoundReference(Types.NestedField field, Accessor<StructLike> accessor, String name) { | ||
| this.field = field; | ||
| this.accessor = accessor; | ||
| this.name = name; |
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.
Tracking the field name was needed to handle bound expressions. This is also a good thing to track for other purposes (e.g., easier to read log messages with bound expressions).
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.
It might be good to add a comment to distinguish this name from the field name.
danielcweeks
left a comment
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.
+1 LGTM. There might be a couple places where we can remove casts with the addition of name to the reference interface, but I only found one example.
Thanks everyone who contributed!
|
Thanks for reviewing, @danielcweeks! |
This adds a JSON parser for
Expressionbased on @nastra's work in #5511, but with a few changes:CustomOrderExpressionVisitorto visit expressions when converting to JSONfromJsontoJson. Using a bound expression ensures that the JSON representation for values matches expression's typeCloses #4308
Closes #5511
Co-authored-by: Eduard Tudenhoefner [email protected]