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

[SPARK-48639][CONNECT][PYTHON] Add Origin to Relation.RelationCommon #47024

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import "google/protobuf/any.proto";
import "spark/connect/expressions.proto";
import "spark/connect/types.proto";
import "spark/connect/catalog.proto";
import "spark/connect/common.proto";

option java_multiple_files = true;
option java_package = "org.apache.spark.connect.proto";
Expand Down Expand Up @@ -106,13 +107,14 @@ message Unknown {}

// Common metadata of all relations.
message RelationCommon {
// TODO(SPARK-48639): Add origin like Expression.ExpressionCommon

// (Required) Shared relation metadata.
string source_info = 1;
// (Optional) Shared relation metadata.
string source_info = 1 [deprecated=true];
Copy link
Member Author

Choose a reason for hiding this comment

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

Seems source_info is unused yet in the codebase ... ?

Copy link
Contributor

Choose a reason for hiding this comment

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

why do we add this field at the first place?

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 think we wanted to leverage it somewhere codepoint but I think we ended up with not using it. @grundprinzip

Copy link
Contributor

@grundprinzip grundprinzip Jun 19, 2024

Choose a reason for hiding this comment

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

I wanted to do what origin does, I had all prototypes etc ready, but never time. You can simply remove this field and mark the id reserved.

Suggested change
string source_info = 1 [deprecated=true];
reserved 1;

Copy link
Member Author

Choose a reason for hiding this comment

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

This actually complains that it's a breaking change:

Run bufbuild/buf-breaking-action@v1
Error: Previously present field "1" with name "source_info" on message "RelationCommon" was deleted.
Error: buf found 1 breaking changes.

I can port this change to branch-3.5 if that's fine.


// (Optional) A per-client globally unique id for a given connect plan.
optional int64 plan_id = 2;

// (Optional) Keep the information of the origin for this expression such as stacktrace.
Origin origin = 3;
}

// Relation that uses a SQL query to generate the output.
Expand Down
Loading