Commit 21d31dd
committed
feat(sea): wire session-level query tags (statement-level already forwarded)
Brings SEA query-tag handling to parity with the Thrift backend across
both scopes:
- Session-level (`openSession({ queryTags })`): NEW — `SeaBackend.openSession`
serializes `request.queryTags` into the reserved `QUERY_TAGS` session conf
(the kernel allowlists `QUERY_TAGS` and forwards it onto the SEA
`CreateSession` `session_confs`), mirroring `ThriftBackend.openSession`.
Runs after the `configuration` merge so `queryTags` takes precedence over
an explicit `configuration.QUERY_TAGS`, per the documented contract.
Verified on a live warehouse that `QUERY_TAGS` reaches the `/sessions` wire.
- Statement-level (`executeStatement({ queryTags })`): already forwarded by
`SeaSessionBackend` into `statementConf.query_tags`. Previously a no-op
because the kernel dropped `statement_conf` before the SEA wire; the
companion kernel PR (databricks-sql-kernel#150) adds the native
`query_tags` array so it now reaches the server end-to-end. Functional
once that lands + KERNEL_REV is bumped.
Tests: openSession serializes session-level queryTags into
sessionConf.QUERY_TAGS, and queryTags wins over an explicit
configuration.QUERY_TAGS. (Statement-level forwarding is already covered.)
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>1 parent 4804f1e commit 21d31dd
2 files changed
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
148 | 163 | | |
149 | 164 | | |
150 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
605 | 635 | | |
606 | 636 | | |
607 | 637 | | |
| |||
0 commit comments