#79302·starrocks

[Feature Request] Support Substrait plans as query input

Author: flex-seongminCreated Sep 18, 2026Updated Sep 18, 2026
Labelstype/feature-request

Feature request

Is your feature request related to a problem? Please describe.

I would like to know whether there are any plans to support submitting Substrait plans directly to StarRocks as an alternative to SQL text.

For applications that generate Substrait plans, integrating with a SQL-based query interface requires an additional Substrait-to-SQL translation layer. This introduces maintenance work around SQL dialect differences, function mappings, and type semantics.

Accepting Substrait plans directly would make it easier to integrate StarRocks with external query planners and tools that use Substrait as their interchange format.

Describe the solution you'd like

Provide an interface for submitting a serialized Substrait plan that StarRocks can translate into its internal representation, optimize, and execute.

Since StarRocks already supports Arrow Flight SQL, could its CommandStatementSubstraitPlan command serve as an entry point?

An initial implementation covering a documented subset of read-only queries—such as table scans, filters, projections, aggregations, and joins—would already be useful, with clear errors for unsupported operators, functions, or types.

Are there any existing proposals, ongoing efforts, or roadmap items related to this? If not, would the maintainers be open to considering it?

If this is not currently on the roadmap, would the maintainers be open to accepting community contributions toward Substrait support? If so, guidance on the preferred approach and initial scope would be helpful.

Describe alternatives you've considered

One alternative is to translate Substrait plans into StarRocks-compatible SQL on the client side and submit the resulting SQL through an existing interface.

This could work as an interim solution, but it requires maintaining the translation layer and validating that function and type semantics are preserved.

Additional context

Substrait provides a language-independent representation of relational query plans: https://substrait.io/

StarRocks documents Arrow Flight SQL support here: https://docs.starrocks.io/docs/unloading/arrow_flight/

The Arrow Flight SQL specification defines CommandStatementSubstraitPlan for submitting Substrait plans: https://arrow.apache.org/docs/format/FlightSql.html

I could not find documentation confirming whether StarRocks supports this command. Any clarification on current support, planned work, or implementation challenges would be appreciated.