Commit 70a228f
committed
fix(utils): import ProgrammingError instead of bare
`ParamEscaper.escape_args` and `ParamEscaper.escape_item` both raise
`exc.ProgrammingError(...)` but `exc` was never imported into utils.py.
On any unsupported parameter shape the user sees `NameError: name 'exc'
is not defined` instead of a clean PEP-249 `ProgrammingError`, masking
the actual problem.
Surfaced via the python-comparator audit harness running the
`INLINE_PARAMS` connection_config: both backends raised
`NameError: name 'exc' is not defined`, which the comparator's
class+message match treated as parity — a false-positive that hid both
the real driver bug and the underlying caller-side type mismatch.
Fix: import `ProgrammingError` directly from `databricks.sql.exc`
(matching the pattern used in `session.py`, `client.py`, `result_set.py`,
etc.) and replace the two `exc.ProgrammingError(...)` sites with bare
`ProgrammingError(...)`.
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>exc. reference1 parent fb55001 commit 70a228f
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
551 | | - | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| |||
606 | 607 | | |
607 | 608 | | |
608 | 609 | | |
609 | | - | |
| 610 | + | |
610 | 611 | | |
611 | 612 | | |
612 | 613 | | |
| |||
0 commit comments