Skip to content

feat(sql): migrate to DataFusion-based streaming SQL#219

Open
luoluoyuyu wants to merge 43 commits intoFunctionStream:mainfrom
luoluoyuyu:feature/streaming-sql
Open

feat(sql): migrate to DataFusion-based streaming SQL#219
luoluoyuyu wants to merge 43 commits intoFunctionStream:mainfrom
luoluoyuyu:feature/streaming-sql

Conversation

@luoluoyuyu
Copy link
Copy Markdown
Collaborator

@luoluoyuyu luoluoyuyu commented Mar 15, 2026

Note

High Risk
Large dependency and planning/execution refactor: introduces DataFusion/Arrow/DataFusion-based streaming SQL planning plus persistent stream table catalog and job submission. Risk comes from new DDL paths (CREATE STREAMING TABLE, connector-backed CREATE TABLE, DROP TABLE) and major crate/version bumps (Arrow 55/DataFusion git forks, bincode v2) affecting runtime behavior and serialization.

Overview
Switches the SQL stack to a DataFusion-based streaming planner: adds compilation support for CREATE STREAMING TABLE ... AS SELECT (including connector options like connector/partition_by) and connector-backed CREATE TABLE ... WITH ('connector'=...), plus DROP TABLE planning.

Wires these new plan nodes through coordinator execution by introducing a CoordinatorRuntimeContext (task manager + stream catalog + job manager), persisting source/sink definitions to the stream catalog, and submitting streaming jobs when creating a streaming sink.

Expands the protocol crate with new protobuf APIs (fs_api.proto, storage.proto) and build output (serde-derived types + descriptor set), adds a new Arrow-backed FsSchema type, and performs a major dependency refresh (Arrow 55, git-pinned DataFusion/Arrow/parquet/sqlparser/typify, bincode 2 + new supporting crates) reflected in Cargo.toml and Cargo.lock.

Written by Cursor Bugbot for commit 7842995. This will update automatically on new commits. Configure here.

StatementVisitorResult::Plan(Box::new(CreateTablePlan::new(plan)))
}
Err(e) => {
panic!("Failed to convert CREATE TABLE to logical plan: {e}");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Planning errors cause server panic instead of error propagation

High Severity

Both visit_create_table and visit_streaming_table_statement call panic! when plan building fails. Since these errors can be triggered by invalid user-supplied SQL, any malformed CREATE TABLE or CREATE STREAMING TABLE statement will crash the entire server process. Every other error path in the visitor pattern properly propagates errors via Result or StatementVisitorResult.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

There are 4 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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.

1 participant