[Feature] Support the Arrow Flight SQL protocol to enhance data transfer efficiency
Why I'm doing:
Significantly enhance data transfer efficiency when using StarRocks for data science computations.
What I'm doing:
This PR adds support for Apache Arrow Flight SQL to StarRocks. Arrow Flight is a high-performance remote procedure call (RPC) framework specifically designed for large-scale data set transmission. By integrating Arrow Flight SQL, StarRocks can achieve more efficient data transfer and query execution, with expected data transfer speed improvements of up to 10 to 100 times. Additionally, StarRocks' Arrow Flight SQL service supports connections through the Python ADBC (Arrow Database Connectivity) standard interface and JDBC (Java Database Connectivity) drivers. This allows significant acceleration of queries and data transfers without needing to modify existing SQL statements, thereby greatly enhancing data analysis performance and user experience
Fix: #50285
What type of PR is this:
- [ ] BugFix
- [x] Feature
- [ ] Enhancement
- [ ] Refactor
- [ ] UT
- [ ] Doc
- [ ] Tool
Does this PR entail a change in behavior?
- [ ] Yes, this PR will result in a change in behavior.
- [x] No, this PR will not result in a change in behavior.
If yes, please specify the type of change:
- [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
- [ ] Parameter changes: default values, similar parameters but with different default values
- [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
- [ ] Feature removed
- [ ] Miscellaneous: upgrade & downgrade compatibility, etc.
Checklist:
- [x] I have added test cases for my bug fix or my new feature
- [ ] This pr needs user documentation (for new or modified features or behaviors)
- [ ] I have added documentation for my new feature or new function
- [ ] This is a backport pr
Bugfix cherry-pick branch check:
- [ ] I have checked the version labels which the pr will be auto-backported to the target branch
- [x] 3.3
- [ ] 3.2
- [ ] 3.1
- [ ] 3.0
- [ ] 2.5
would better give the performance report
@liubotao Thank you very much for your contribution. However this change is super large, to make everyone on the same page, could you create a feature request GitHub Issue to track this feature? And you should give the design details in that ticket to let others know how this feature works.
@liubotao Thank you very much for your contribution. However this change is super large, to make everyone on the same page, could you create a feature request GitHub Issue to track this feature? And you should give the design details in that ticket to let others know how this feature works.
Related Issue:https://github.com/StarRocks/starrocks/issues/50285
Quality Gate failed
Failed conditions
C Reliability Rating on New Code (required ≥ A)
D Security Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
Any update about supporting Arrow Flight SQL?
Quality Gate failed
Failed conditions
C Reliability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
[BE Incremental Coverage Report]
:x: fail : 5 / 140 (03.57%)
file detail
| path | covered_line | new_line | coverage | not_covered_line_detail | |
|---|---|---|---|---|---|
| :large_blue_circle: | be/src/agent/heartbeat_server.cpp | 0 | 1 | 00.00% | [136] |
| :large_blue_circle: | be/src/util/uid_util.cpp | 0 | 14 | 00.00% | [96, 97, 99, 100, 102, 106, 107, 109, 110, 111, 112, 114, 115, 116] |
| :large_blue_circle: | be/src/runtime/arrow_result_writer.cpp | 0 | 34 | 00.00% | [34, 35, 36, 38, 39, 40, 41, 44, 45, 47, 49, 52, 53, 54, 56, 57, 60, 61, 64, 65, 66, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 83] |
| :large_blue_circle: | be/src/runtime/result_sink.h | 0 | 1 | 00.00% | [84] |
| :large_blue_circle: | be/src/service/internal_service.cpp | 0 | 14 | 00.00% | [897, 900, 901, 902, 903, 904, 905, 907, 909, 910, 911, 912, 914, 915] |
| :large_blue_circle: | be/src/exec/pipeline/result_sink_operator.h | 0 | 5 | 00.00% | [45, 46, 104, 105, 117] |
| :large_blue_circle: | be/src/exec/pipeline/result_sink_operator.cpp | 0 | 3 | 00.00% | [64, 65, 66] |
| :large_blue_circle: | be/src/runtime/result_sink.cpp | 0 | 1 | 00.00% | [57] |
| :large_blue_circle: | be/src/exec/data_sink.cpp | 0 | 2 | 00.00% | [280, 281] |
| :large_blue_circle: | be/src/runtime/result_buffer_mgr.cpp | 0 | 15 | 00.00% | [121, 122, 123, 124, 126, 127, 128, 130, 131, 132, 134, 135, 136, 137, 139] |
| :large_blue_circle: | be/src/util/arrow/row_batch.cpp | 0 | 7 | 00.00% | [224, 225, 226, 227, 230, 231, 232] |
| :large_blue_circle: | be/src/runtime/buffer_control_block.cpp | 5 | 43 | 11.63% | [143, 144, 145, 148, 149, 150, 153, 154, 157, 159, 160, 190, 191, 192, 193, 194, 328, 329, 330, 331, 334, 335, 338, 339, 342, 343, 346, 347, 348, 349, 350, 351, 352, 353, 355, 356, 359, 360] |
[Java-Extensions Incremental Coverage Report]
:white_check_mark: pass : 0 / 0 (0%)
[FE Incremental Coverage Report]
:x: fail : 337 / 556 (60.61%)
file detail
| path | covered_line | new_line | coverage | not_covered_line_detail | |
|---|---|---|---|---|---|
| :large_blue_circle: | com/starrocks/StarRocksFE.java | 0 | 2 | 00.00% | [167, 175] |
| :large_blue_circle: | com/starrocks/qe/StmtExecutor.java | 17 | 64 | 26.56% | [677, 678, 685, 686, 690, 691, 702, 703, 704, 705, 706, 897, 898, 1272, 1273, 1274, 1275, 1276, 1329, 1333, 1336, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1355, 1356, 1361, 1371, 1372, 1830, 1831, 1832, 2442, 2443, 2469, 2470, 2521, 2522, 2555] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/ArrowFlightSqlService.java | 16 | 38 | 42.11% | [62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/ArrowFlightSqlConnectContext.java | 35 | 68 | 51.47% | [73, 77, 78, 89, 105, 106, 109, 117, 118, 166, 168, 171, 172, 173, 174, 175, 177, 178, 179, 180, 181, 182, 183, 185, 186, 187, 188, 189, 190, 192, 197, 198, 199] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/session/ArrowFlightSqlTokenManager.java | 16 | 29 | 55.17% | [43, 44, 45, 46, 48, 52, 68, 73, 74, 79, 80, 84, 85] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/ArrowFlightSqlServiceImpl.java | 101 | 169 | 59.76% | [113, 114, 115, 116, 117, 118, 120, 121, 138, 139, 140, 151, 159, 171, 172, 177, 184, 186, 187, 189, 190, 191, 192, 194, 195, 196, 197, 198, 199, 206, 207, 225, 231, 237, 242, 248, 254, 260, 261, 262, 264, 270, 276, 281, 287, 293, 299, 305, 311, 317, 323, 329, 334, 335, 342, 344, 348, 362, 363, 373, 374, 392, 410, 411, 433, 434, 445, 455] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/ArrowFlightSqlConnectProcessor.java | 43 | 62 | 69.35% | [78, 80, 81, 82, 83, 84, 85, 87, 88, 91, 92, 93, 95, 97, 133, 134, 135, 136, 139] |
| :large_blue_circle: | com/starrocks/system/ComputeNode.java | 6 | 8 | 75.00% | [260, 261] |
| :large_blue_circle: | com/starrocks/common/util/ArrowUtil.java | 8 | 10 | 80.00% | [31, 32] |
| :large_blue_circle: | com/starrocks/qe/ConnectScheduler.java | 15 | 18 | 83.33% | [210, 211, 227] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/auth/ArrowFlightSqlAuthenticator.java | 15 | 18 | 83.33% | [52, 55, 56] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/session/ArrowFlightSqlSessionManager.java | 23 | 27 | 85.19% | [49, 50, 68, 69] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/auth/ArrowFlightSqlCredentialValidator.java | 13 | 14 | 92.86% | [40] |
| :large_blue_circle: | com/starrocks/common/Config.java | 3 | 3 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/system/BackendHbResponse.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/qe/DefaultCoordinator.java | 4 | 4 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/qe/ResultReceiver.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/system/HeartbeatMgr.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/qe/scheduler/QueryRuntimeProfile.java | 5 | 5 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/sql/StatementPlanner.java | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/service/arrow/flight/sql/session/ArrowFlightSqlTokenInfo.java | 7 | 7 | 100.00% | [] |
ignore backport check 3.3.7
ignore backport check: 3.3.7
@Mergify ignore backport check: 3.3.7
ignore backport check: 3.3.7
❌ Sorry but I didn't understand the command. Please consult the commands documentation 📚.
In which release is commit 40e0035 planned to be included? Thanks!