Commit 8f18b05
[PECOBLR-1172] Add configuration and protocol selection for SEA Phase 1
This commit implements the foundational configuration support for protocol
selection between Thrift and REST protocols as part of Statement Execution
API (SEA) Phase 1.
Changes:
- Added ExecutionProtocol field to UserConfig (defaults to "thrift")
- Added WarehouseID field to UserConfig (required for REST protocol)
- Added MaxPollInterval and PollBackoffMultiplier fields to Config
- Implemented DSN parsing for protocol/executionProtocol parameters
- Implemented DSN parsing for warehouse_id/warehouseId parameters
- Added validation to require warehouse_id when using REST protocol
- Updated DeepCopy methods to include new fields
- Updated WithDefaults to set proper default values:
- ExecutionProtocol: "thrift" (backward compatible)
- MaxPollInterval: 60 seconds
- PollBackoffMultiplier: 2.0
- Added comprehensive unit tests for all new functionality
The implementation supports both snake_case and camelCase parameter names
for user convenience (protocol/executionProtocol, warehouse_id/warehouseId).
Related design doc: statement-execution-api-design-go.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 845334e commit 8f18b05
2 files changed
+262
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
| 152 | + | |
| 153 | + | |
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
| |||
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
179 | 190 | | |
180 | 191 | | |
181 | 192 | | |
| |||
189 | 200 | | |
190 | 201 | | |
191 | 202 | | |
| 203 | + | |
| 204 | + | |
192 | 205 | | |
193 | 206 | | |
194 | 207 | | |
| |||
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
285 | 312 | | |
286 | 313 | | |
287 | 314 | | |
| |||
298 | 325 | | |
299 | 326 | | |
300 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
301 | 334 | | |
302 | 335 | | |
303 | 336 | | |
| |||
0 commit comments