Commit 3477416
committed
[SEA-NodeJS] map kernel SqlError to OperationStateError for Thrift parity
Server-reported SQL execution failures (kernel `SqlError` — bad query,
missing table, divide-by-zero, invalid cast, param type mismatch) were
surfaced as the base `HiveDriverError` on the SEA/kernel path, while the
Thrift backend raises `OperationStateError(Error)` when the operation
reaches ERROR_STATE. The comparator flagged every error path as a
class mismatch (Thrift `OperationStateError` vs SEA `HiveDriverError`),
and the Python kernel connector matches Thrift here — so the divergence
was in this mapping, not the kernel.
Map `SqlError` -> `OperationStateError(OperationStateErrorCode.Error)`,
preserving the kernel message. `OperationStateError extends
HiveDriverError`, so existing `instanceof HiveDriverError` catches are
unaffected. Other code mappings (InvalidArgument -> ParameterError,
auth, network, etc.) are unchanged.
Verified against the comparator warehouse: all ERROR_PATHS cases
(table-not-found, syntax error, unresolved column, divide-by-zero,
invalid cast, param mismatch) now match the Thrift backend.
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>1 parent 4b9e16e commit 3477416
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
150 | 164 | | |
151 | 165 | | |
152 | 166 | | |
| |||
156 | 170 | | |
157 | 171 | | |
158 | 172 | | |
159 | | - | |
160 | 173 | | |
161 | 174 | | |
162 | 175 | | |
| |||
0 commit comments