Skip to content

Commit 09cb592

Browse files
committed
[SPARK-48639][CONNECT][PYTHON] Add Origin to Relation.RelationCommon
### What changes were proposed in this pull request? This PR proposes to add `Origin` (from #46789) to `Relation.RelationCommon` ### Why are the changes needed? To have the common protobuf message to keep the source code info. ### Does this PR introduce _any_ user-facing change? No. This is not used. ### How was this patch tested? CI should validate protobuf definition, and exiting tests should pass. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47024 from HyukjinKwon/SPARK-48639. Lead-authored-by: Hyukjin Kwon <gurwls223@apache.org> Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent e459674 commit 09cb592

File tree

3 files changed

+180
-161
lines changed

3 files changed

+180
-161
lines changed

connector/connect/common/src/main/protobuf/spark/connect/relations.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "google/protobuf/any.proto";
2323
import "spark/connect/expressions.proto";
2424
import "spark/connect/types.proto";
2525
import "spark/connect/catalog.proto";
26+
import "spark/connect/common.proto";
2627

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

107108
// Common metadata of all relations.
108109
message RelationCommon {
109-
// TODO(SPARK-48639): Add origin like Expression.ExpressionCommon
110-
111-
// (Required) Shared relation metadata.
112-
string source_info = 1;
110+
// (Optional) Shared relation metadata.
111+
reserved 1;
113112

114113
// (Optional) A per-client globally unique id for a given connect plan.
115114
optional int64 plan_id = 2;
115+
116+
// (Optional) Keep the information of the origin for this expression such as stacktrace.
117+
Origin origin = 3;
116118
}
117119

118120
// Relation that uses a SQL query to generate the output.

0 commit comments

Comments
 (0)