Make ConnectorExpression JSON serializable#11447
Make ConnectorExpression JSON serializable#11447assaf2 wants to merge 1 commit intotrinodb:masterfrom
Conversation
71f2104 to
e7b4e6c
Compare
|
|
||
| import static java.util.Objects.requireNonNull; | ||
|
|
||
| @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS) |
There was a problem hiding this comment.
Don't you need to enumerate known subclasses as in
?|
I had some thoughts in #11045, however same concern as in #1720 (comment) applies -- if SPI knows all subclasses, it would be convenient to add a visitor pattern; also, JSON-serialization may be taken as implying serialized form backward- and forward-compatibility, but we make no guarantees about that, otherwise we should have test coverage for that. @assaf2 what problem are you trying to solve? |
The SPI won't need to be aware of all the subclasses. When
We're already using
Why JSON-serialization backward- and forward-compatibility is taken more "seriously" than the SPI class itself?
I want to pass the |
That was my intuition in #11045, but i realized not needing that is actually simple. |
In my case, each worker dynamically supports different predicates. |
|
👋 @assaf2 - this PR has become inactive. If you're still interested in working on it, please let us know. We're working on closing out old and inactive PRs, so if you're too busy or this has too many merge conflicts to be worth picking back up, we'll be making another pass to close it out in a few weeks. |
Since
TupleDomainis JSON serializable, IMOConnectorExpressionshould be as well