Skip to content

feat: update substrait-go to substrait v0.79.0#194

Merged
vbarua merged 11 commits intomainfrom
vbarua/v0.79.0-update
Feb 4, 2026
Merged

feat: update substrait-go to substrait v0.79.0#194
vbarua merged 11 commits intomainfrom
vbarua/v0.79.0-update

Conversation

@vbarua
Copy link
Copy Markdown
Member

@vbarua vbarua commented Feb 4, 2026

No description provided.

{"((20, 20), (-3, -3), (1, 1), (10,10), (5,5)) corr(my_col::fp32, col0::fp32) = 1::fp64", "mismatched input 'my_col'"},
{"((20, 20), (-3, -3), (1, 1), (10,10), (5,5)) corr(col0::fp32, column1::fp32) = 1::fp64", "mismatched input 'column1'"},
{"((20, 20), (-3, -3), (1, 1), (10,10), (5,5)) corr(my_col::fp32, col0::fp32) = 1::fp64", "mismatched input '::' expecting ')"},
{"((20, 20), (-3, -3), (1, 1), (10,10), (5,5)) corr(col0::fp32, column1::fp32) = 1::fp64", "mismatched input '::' expecting ')"},
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because of updates to the function test grammar, these now fail with a different error message.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 82.75862% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.74%. Comparing base (1c2291f) to head (c4922f4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
testcases/parser/visitor.go 82.75% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
- Coverage   68.79%   68.74%   -0.06%     
==========================================
  Files          45       45              
  Lines       10367    10369       +2     
==========================================
- Hits         7132     7128       -4     
- Misses       2886     2892       +6     
  Partials      349      349              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

}

func (v *TestCaseVisitor) VisitBoolean(*baseparser.BooleanContext) interface{} {
return &types.BooleanType{Nullability: types.NullabilityRequired}
Copy link
Copy Markdown
Member Author

@vbarua vbarua Feb 4, 2026

Choose a reason for hiding this comment

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

This used to work by setting the nullability to NullabilityRequired, and then the VisitDataType which invoked this would override the nullability. As types have the nullability attached directly to them, we can just set the nullability correctly here. Tests failed without these changes.

Comment thread doc.go

// Package substraitgo contains the experimental go bindings for substrait
// (https://substrait.io).
//
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Stray update from go fmt

Copy link
Copy Markdown
Contributor

@Slimsammylim Slimsammylim left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

Copy link
Copy Markdown
Member

@benbellick benbellick left a comment

Choose a reason for hiding this comment

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

LGTM! Only remaining comment is about whether we should actually panic instead of reporting the error. This is a non-blocking issue though so feel free to ignore.

@@ -427,7 +427,7 @@ func (v *TestCaseVisitor) VisitNullArg(ctx *baseparser.NullArgContext) interface

func (v *TestCaseVisitor) VisitBooleanArg(ctx *baseparser.BooleanArgContext) interface{} {
value := strings.ToLower(ctx.BooleanLiteral().GetText()) == "true"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This isn't this PR so no worries about fixing here, but seems a bit strange to treat everything that isn't "true" as false.

Copy link
Copy Markdown
Member

@benbellick benbellick Feb 4, 2026

Choose a reason for hiding this comment

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

I think this is okay because the parser already would have thrown an error if it was not "true" or "false". So you can ignore this comment!

if ctx.I64() != nil {
return &types.Int64Type{Nullability: nullability}
}
v.ErrorListener.ReportVisitError(ctx, fmt.Errorf("invalid integer type %v", ctx.GetText()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The codecove report is complaining about all of these lines never being hit by the test cases. If I understand the grammar correctly, I think that this is truly an impossible state, because to reach here, we had to have already parsed one of the above 4 int types. Thus, a panic may be a more informative move here because we can use it to communicate an impossible state.

That being said, I'm not so particular on this issue and it isn't blocking for me. (Same comment applies everywhere else we have v.ErrorListener added.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As discussed offline, it may actually make sense to leave v.ErrorListener here instead of panicking. This makes the code forwards compatible. If someone updates the grammar, but forgets to update the visitor logic, we won't panic.

substrait-go does not currently support lambdas, which are needed to
handle the filter and transform function in this extension
unsupportedExtensions = map[string]bool{
"unknown.yaml": true,
// Missing support for func/lambda types
"functions_list.yaml": true,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@Slimsammylim we should be able to remove this after you finish your support for lambdas

Copy link
Copy Markdown
Contributor

@Slimsammylim Slimsammylim left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Copy Markdown
Member

@benbellick benbellick left a comment

Choose a reason for hiding this comment

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

LGTM, too!

@vbarua vbarua merged commit ba40d10 into main Feb 4, 2026
12 checks passed
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.

3 participants