Commit 3f115aa
authored
Add enforceEmbeddedSchemaCorrectness to TExecuteStatementReq (#344)
## Summary
- Adds a new optional bool field `enforceEmbeddedSchemaCorrectness`
(field ID `0xD19` / 3353) to `TExecuteStatementReq` in the thrift
contract
- Exposes it as an opt-in configuration parameter
(`EnforceEmbeddedSchemaCorrectness`, default `false`) via connector
option, DSN parameter, and config struct
- When enabled (`true`), the field is set in the thrift request so the
server enforces embedded schema correctness during query execution
## Changes
- `internal/cli_service/cli_service.go` — Added field with full
Read/Write/IsSet/Equals support following existing `*bool` pointer
pattern
- `internal/config/config.go` — Added `EnforceEmbeddedSchemaCorrectness`
to `UserConfig` + DSN parsing
- `connector.go` — Added `WithEnforceEmbeddedSchemaCorrectness()`
connector option
- `connection.go` — Wired config to `TExecuteStatementReq` in
`executeStatement()`
## Test plan
- [ ] Verify compilation passes
- [ ] Test with `enforceEmbeddedSchemaCorrectness=true` in DSN
- [ ] Test with `WithEnforceEmbeddedSchemaCorrectness(true)` connector
option
- [ ] Verify field is serialized in thrift request when enabled
- [ ] Verify field is not sent when disabled (default)
Resolves: ES-1804970
This pull request was AI-assisted by Isaac.1 parent f0487d1 commit 3f115aa
5 files changed
Lines changed: 81 additions & 12 deletions
File tree
- internal
- cli_service
- config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| 518 | + | |
| 519 | + | |
518 | 520 | | |
519 | 521 | | |
520 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | | - | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
55 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
87 | | - | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
305 | 313 | | |
306 | 314 | | |
307 | 315 | | |
| |||
0 commit comments