Skip to content
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: create an exportable version of plan loading #91

Merged
merged 39 commits into from
Feb 13, 2024

Conversation

EpsilonPrime
Copy link
Member

This PR adds an installable target of the plan loading routines (notably the text format) that is more readily consumed by other languages.

@EpsilonPrime EpsilonPrime marked this pull request as draft February 6, 2024 06:39
@EpsilonPrime
Copy link
Member Author

Since this depends on the #89 I'm switching this PR temporarily into draft mode.

@westonpace westonpace removed their request for review February 7, 2024 16:48
Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know when the dependent PR merges and then I will formally review this.

export/planloader/planloader.h Outdated Show resolved Hide resolved
@EpsilonPrime EpsilonPrime marked this pull request as ready for review February 8, 2024 23:33
@EpsilonPrime
Copy link
Member Author

This should be ready to go now.

Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approve but I suggest we bit a bit more formal on external API documentation. Easier to start formal and consistent than to try and catch up later.

export/planloader/CMakeLists.txt Outdated Show resolved Hide resolved
if(NOT BUILD_SUBDIR_NAME EQUAL "release")
message(
SEND_ERROR,
"The planloader library does not work in Debug mode due to its dependencies."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? Does this mean you can't build the planloader in debug mode (annoying but ok)? Or does this mean that someone linking to the planloader cannot build in debug (probably an issue)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is all of the sanitization stuff that we're including in debug mode. An unfettered debug mode would be fine.

export/planloader/CMakeLists.txt Outdated Show resolved Hide resolved
extern "C" {

using SerializedPlan = struct {
// If set, contains a serialized ::substrait::proto::Plan object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've become used to // indicating "internal comment" and /// indicating "formal documentation". Do we want to stick to that convention?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I want to formalize this interface. If someone wants to use the C++ code they should be using the recently exposed substrait_io library. This version is for wrapping purposes only so I'd like it to be more obscure.

export/planloader/planloader.h Outdated Show resolved Hide resolved
export/planloader/planloader.h Outdated Show resolved Hide resolved
export/planloader/planloader.h Show resolved Hide resolved
export/planloader/planloader.h Show resolved Hide resolved
export/planloader/planloader.h Outdated Show resolved Hide resolved
export/planloader/tests/PlanLoaderTest.cpp Outdated Show resolved Hide resolved
@EpsilonPrime EpsilonPrime merged commit e369b92 into substrait-io:main Feb 13, 2024
3 checks passed
@EpsilonPrime EpsilonPrime deleted the export_java branch February 13, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants