-
Notifications
You must be signed in to change notification settings - Fork 345
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: serialize/deserialize logical and execution plan via substrait #317
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
I decide to drop support of |
Signed-off-by: Ruihang Xia <[email protected]>
Codecov Report
@@ Coverage Diff @@
## develop #317 +/- ##
===========================================
- Coverage 84.16% 84.05% -0.12%
===========================================
Files 348 351 +3
Lines 31790 32152 +362
===========================================
+ Hits 26757 27025 +268
- Misses 5033 5127 +94
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
sunng87
reviewed
Oct 23, 2022
Signed-off-by: Ruihang Xia <[email protected]>
sunng87
approved these changes
Oct 24, 2022
evenyag
reviewed
Oct 24, 2022
Signed-off-by: Ruihang Xia <[email protected]>
evenyag
approved these changes
Oct 24, 2022
paomian
pushed a commit
to paomian/greptimedb
that referenced
this pull request
Oct 19, 2023
…reptimeTeam#317) * fix: change Utf8Array indice type Signed-off-by: Ruihang Xia <[email protected]> * refactor: remove unused sub-crate Signed-off-by: Ruihang Xia <[email protected]> * feat: impl for both Logical and Execution plan Signed-off-by: Ruihang Xia <[email protected]> * refactor: move test-util subcrate into table Signed-off-by: Ruihang Xia <[email protected]> * test: table scan logical plan round trip Signed-off-by: Ruihang Xia <[email protected]> * drop support of physical plan Signed-off-by: Ruihang Xia <[email protected]> * fix warnings Signed-off-by: Ruihang Xia <[email protected]> * rename trait fns to encode/decode Signed-off-by: Ruihang Xia <[email protected]> * address review comments Signed-off-by: Ruihang Xia <[email protected]> Signed-off-by: Ruihang Xia <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch implements the serialization and deserialization of our plans (DF's logical plan and execution plan for now). It's required by #291.
I choose https://substrait.io as the intermediate representation of plans, which is (or aim to be) a well-defined, cross-language specification for data compute operations. This kind of impl-unrelated representation can let us not only to communicate plans between Frontend and Datanode, but also gives the possibility to communicate with other systems in the future (but not the near future I suppose 🫣 it's not that widely used at present (I only find duckdb supports this among DBs). More on plan like apache/datafusion-ballista#30 (comment)).
And for the ser/de target, I'm not sure which one is better (logical or physical plan) so I implement both. Maybe for a non-hybrid computation (i.e. GT to GT) we can provide enough information to reassemble a physical plan (I guess)? But whatever, serializing a physical plan needs tremendous
downcast
and logical plan is more ergonomic...Back to this patch, it only ships an implementation in the very early stage -- only bare table scan is supported. Other things like translating substrait's expression or schema, and the remaining plans are expected to be done later. I'll open a detailed list to track them.