Skip to content

feat: add support for unresolved expressions#1063

Draft
malinjawi wants to merge 1 commit intosubstrait-io:mainfrom
malinjawi:malinjawi/unbound-expressions-spec
Draft

feat: add support for unresolved expressions#1063
malinjawi wants to merge 1 commit intosubstrait-io:mainfrom
malinjawi:malinjawi/unbound-expressions-spec

Conversation

@malinjawi
Copy link
Copy Markdown

@malinjawi malinjawi commented Apr 28, 2026

Refs #515

This adds minimal protocol support for partially bound / unresolved expressions in Substrait.

Changes included:

  • add Type.Unknown as a placeholder type for partially bound expressions
  • add Expression.NamedExpression for unresolved name-based references
  • document how partially bound expressions are detected structurally
  • add textproto examples for unresolved Expression and ExtendedExpression
  • update the type grammar to parse unknown
  • regenerate the checked-in parser artifacts
  • add validation and contract tests for the new examples

This keeps the design minimal:

  • there is no separate unbound-expression hierarchy
  • partially bound state is represented structurally by the presence of unknown and/or NamedExpression

Validation:

  • buf lint
  • buf generate
  • pytest coverage for the new examples and parser/type handling

This PR adds representational support only. Consumers still need to bind unresolved names, types, and function references before execution unless they define unresolved-expression semantics themselves.

Note: the large generated diffs are from regenerating the checked-in ANTLR parser artifacts after adding unknown to the grammar.


This change is Reviewable

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Mohammad Linjawi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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