Skip to content

Add query engine selection field to query proto - #213

Merged
kalabukdima merged 1 commit into
net-stream-server-workerfrom
query-engine-proto
Jul 16, 2026
Merged

Add query engine selection field to query proto#213
kalabukdima merged 1 commit into
net-stream-server-workerfrom
query-engine-proto

Conversation

@kalabukdima

Copy link
Copy Markdown
Contributor

Add a field to use the experimental query engine (https://github.com/subsquid/sqd-query-engine/)

@kalabukdima
kalabukdima requested a review from mo4islona July 15, 2026 09:13
@kalabukdima kalabukdima self-assigned this Jul 15, 2026
Comment thread crates/messages/proto/messages.proto Outdated
}

enum QueryEngine {
QUERY_ENGINE_UNSPECIFIED = 0; // the default (legacy) engine

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need

  • QUERY_ENGINE_UNSPECIFIED (which semantically is QUERY_ENGINE_DEFAULT)
  • QUERY_ENGINE_V1
  • QUERY_ENGINE_V2

In order to force everything back if we switch all workers.
And V{1-9} i is much more forward compatible, any experimental stuff will eventually become non experimental or die

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renaming from experimental to stable can always be done later. How about QUERY_ENGINE_DYNAMIC?

I wanted to avoid wire overhead for now, that's why I left the unspecified variant for the legacy query engine. On the worker side, we can still ignore any unknown values to remain forward-compatible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Another idea is just having a bool use_dynamic_query_engine for now until we have plans for a third query engine. But I thought the enum may extend for the SQL case as well

@kalabukdima
kalabukdima force-pushed the query-engine-proto branch 2 times, most recently from 8fb2561 to 9f92e54 Compare July 15, 2026 13:39
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kalabukdima
kalabukdima merged commit 0633335 into net-stream-server-worker Jul 16, 2026
6 checks passed
@kalabukdima
kalabukdima deleted the query-engine-proto branch July 16, 2026 10:22
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