[Feature] Add Arrow Flight SQL transport for StarRocks connector#8910
Open
EdwardArchive wants to merge 6 commits intorilldata:mainfrom
Open
[Feature] Add Arrow Flight SQL transport for StarRocks connector#8910EdwardArchive wants to merge 6 commits intorilldata:mainfrom
EdwardArchive wants to merge 6 commits intorilldata:mainfrom
Conversation
- Route Query/QuerySchema via Arrow Flight SQL when transport=flight_sql; fall back to MySQL for parameterized queries - Implement DoGet BE routing with client pooling and flight_sql_be_addr override for Docker/NAT - Upgrade test image to StarRocks 4.0.4; unified test structure running both transports in a single container
- Add flight_sql_max_conns semaphore to prevent FE connection exhaustion - Add Arrow Flight SQL section to StarRocks connector docs - Add connection limit retry logic in benchmarks
- Use sqlconvert.ConvertAssign instead of direct assignment - Add unit tests for parseFlightLocation (7 cases) - Add integration tests for Scan, NULL handling, and parameter fallback
- Apply context.WithTimeout in Query() when ExecutionTimeout is set - Evict cached BE client on DoGet failure for automatic reconnection
Keep transport-agnostic date/time assertions (fmt.Sprintf) for MySQL + FlightSQL compatibility.
…eprecated arrow.Record
f6a5056 to
8d7f94d
Compare
Contributor
Author
|
The job failed because the Druid test DSN was not configured. |
Contributor
Author
|
Hey @k-anshul , I know you’re busy, but if you get a chance, could you take a look at the code? Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue : #8911
Query()/QuerySchema()through Arrow Flight SQL whentransport: "flight_sql"is configured;Exec()/DryRunalways use MySQL (Arrow Flight SQL supports DDL/DML but offers no performance benefit for non-data-returning operations)Execute(), DoGet is routed to BE nodes via endpoint Location URIsflight_sql_max_connssemaphore to prevent exhausting StarRocks FE's per-user connection limit (default 1024), following the same pattern as the DuckDB driverExecutionTimeoutviacontext.WithTimeout, consistent with ClickHouse, Druid, Pinot, and DuckDB driversflightRows.Scanto write through pointers viasqlconvert.ConvertAssign, matching Redshift/Athena/BigQuery driversstmt.Args), since Flight SQL does not support query parametersBenchmark Results
Environment: AMD RYZEN AI MAX+ 395 (32 cores), StarRocks 4.0.4,
-benchtime=50x -count=3Query Size Comparison (ad_bids table, 100K rows)
SELECT 1)Full Table Scan Throughput (100K rows)
Key Observations
Configuration
Architecture
Files Changed
starrocks.goTransport,FlightSQLPort,FlightSQLBEAddr,FlightSQLMaxConnsconfig; BE client pool; semaphore initolap.goQuery()/QuerySchema();ExecutionTimeoutsupport; extractqueryMySQL()/querySchemaMySQL()flight.goflight_rows.godrivers.Resultconversion;flightRows(Next/MapScan/Scan/Close); semaphore lifecycleflight_test.goTestParseFlightLocation(7 cases), Scan pointer tests, NULL handling, parameter fallbackolap_test.gobench_test.goteststarrocks.gotestdata/be.confarrow_flight_port = 9419testdata/fe.confarrow_flight_port = 9408docs/.../starrocks.mdChecklist: