Skip to content

Commit 46d6993

Browse files
committed
Update proto definition to v0.55.0
1 parent cbd28cb commit 46d6993

File tree

7 files changed

+4101
-3200
lines changed

7 files changed

+4101
-3200
lines changed

doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Package substraitgo contains the experimental go bindings for substrait
44
// (https://substrait.io).
55
//
6-
// Current generated proto substrait version: v0.53.0
6+
// Current generated proto substrait version: v0.55.0
77
package substraitgo
88

9-
//go:generate buf generate https://github.com/substrait-io/substrait.git#tag=v0.53.0
9+
//go:generate buf generate https://github.com/substrait-io/substrait.git#tag=v0.55.0

plan/plan_builder_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,12 +619,12 @@ func TestJoinRelOutputRecordTypes(t *testing.T) {
619619
recordString string
620620
}{
621621
{"JOIN_TYPE_INNER", plan.JoinTypeInner, []string{"a", "b", "c", "d"}, "NSTRUCT<a: string, b: fp32, c: i32, d: boolean>"},
622-
{"JOIN_TYPE_SEMI", plan.JoinTypeSemi, []string{"a", "b"}, "NSTRUCT<a: string, b: fp32>"},
622+
{"JOIN_TYPE_RIGHT_SEMI", plan.JoinTypeRightSemi, []string{"a", "b"}, "NSTRUCT<a: string, b: fp32>"},
623623
{"JOIN_TYPE_OUTER", plan.JoinTypeOuter, []string{"a", "b", "c", "d"}, "NSTRUCT<a: string?, b: fp32?, c: i32?, d: boolean?>"},
624624
{"JOIN_TYPE_LEFT", plan.JoinTypeLeft, []string{"a", "b", "c", "d"}, "NSTRUCT<a: string, b: fp32, c: i32?, d: boolean?>"},
625625
{"JOIN_TYPE_RIGHT", plan.JoinTypeRight, []string{"a", "b", "c", "d"}, "NSTRUCT<a: string?, b: fp32?, c: i32, d: boolean>"},
626-
{"JOIN_TYPE_ANTI", plan.JoinTypeAnti, []string{"a", "b"}, "NSTRUCT<a: string, b: fp32>"},
627-
{"JOIN_TYPE_SINGLE", plan.JoinTypeSingle, []string{"a", "b", "c", "d"}, "NSTRUCT<a: string, b: fp32, c: i32?, d: boolean?>"},
626+
{"JOIN_TYPE_RIGHT_ANTI", plan.JoinTypeRightAnti, []string{"a", "b"}, "NSTRUCT<a: string, b: fp32>"},
627+
{"JOIN_TYPE_RIGHT_SINGLE", plan.JoinTypeRightSingle, []string{"a", "b", "c", "d"}, "NSTRUCT<a: string, b: fp32, c: i32?, d: boolean?>"},
628628
}
629629

630630
for _, tt := range tests {
@@ -764,7 +764,7 @@ func TestJoinRelationError(t *testing.T) {
764764
assert.ErrorIs(t, err, substraitgo.ErrInvalidRel)
765765
assert.ErrorContains(t, err, "output mapping index out of range")
766766

767-
_, err = b.JoinRemap(left, right, goodcond, plan.JoinTypeAnti, []int32{2})
767+
_, err = b.JoinRemap(left, right, goodcond, plan.JoinTypeRightAnti, []int32{2})
768768
assert.ErrorIs(t, err, substraitgo.ErrInvalidRel)
769769
assert.ErrorContains(t, err, "output mapping index out of range")
770770

plan/relations.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ const (
585585
JoinTypeOuter = proto.JoinRel_JOIN_TYPE_OUTER
586586
JoinTypeLeft = proto.JoinRel_JOIN_TYPE_LEFT
587587
JoinTypeRight = proto.JoinRel_JOIN_TYPE_RIGHT
588-
JoinTypeSemi = proto.JoinRel_JOIN_TYPE_SEMI
589-
JoinTypeAnti = proto.JoinRel_JOIN_TYPE_ANTI
590-
JoinTypeSingle = proto.JoinRel_JOIN_TYPE_SINGLE
588+
JoinTypeRightSemi = proto.JoinRel_JOIN_TYPE_RIGHT_SEMI
589+
JoinTypeRightAnti = proto.JoinRel_JOIN_TYPE_RIGHT_ANTI
590+
JoinTypeRightSingle = proto.JoinRel_JOIN_TYPE_RIGHT_SINGLE
591591
)
592592

593593
// JoinRel is a binary Join relational operator representing left-join-right,
@@ -607,14 +607,14 @@ func (j *JoinRel) RecordType() types.StructType {
607607
switch j.joinType {
608608
case JoinTypeInner:
609609
return j.JoinedRecordType()
610-
case JoinTypeSemi:
610+
case JoinTypeRightSemi:
611611
return j.left.Remap(j.left.RecordType())
612612
case JoinTypeOuter:
613613
typeList = j.JoinedRecordType().Types
614614
for i, t := range typeList {
615615
typeList[i] = t.WithNullability(types.NullabilityNullable)
616616
}
617-
case JoinTypeLeft, JoinTypeSingle:
617+
case JoinTypeLeft, JoinTypeRightSingle:
618618
left := j.left.Remap(j.left.RecordType())
619619
right := j.right.Remap(j.right.RecordType())
620620
typeList = make([]types.Type, 0, len(left.Types)+len(right.Types))
@@ -630,7 +630,7 @@ func (j *JoinRel) RecordType() types.StructType {
630630
typeList = append(typeList, l.WithNullability(types.NullabilityNullable))
631631
}
632632
typeList = append(typeList, right.Types...)
633-
case JoinTypeAnti:
633+
case JoinTypeRightAnti:
634634
typeList = j.left.RecordType().Types
635635
}
636636

0 commit comments

Comments
 (0)