youdie006 commented on PR #69431:
URL: https://github.com/apache/airflow/pull/69431#issuecomment-5137555164
Thanks for the careful review @potiuk — reworked in 761fb2b.
**`cast` on `parameters` → convert/reject at the boundary.** Added
`_serialize_query_params`: a `Mapping` becomes a plain `dict`, and a positional
sequence now raises a clear `TypeError` instead of being cast to `dict`. Exasol
binds named parameters only, so a positional sequence never actually worked —
it now fails at the boundary with a helpful message rather than deep inside the
driver. I went with "reject" over "convert" here because there is no meaningful
positional-to-named conversion.
**`cast("str", sql)` in `get_records` / `get_first`.** Took your second
option — handle the list branch the way `run()` does. `_execute_statements`
treats a `str` as one statement and a `list[str]` as sequential statements,
returning the last cursor to fetch from. That keeps the base `str | list[str]`
contract (a list has been valid input since #23812) with no cast. `run()`'s own
`sql_list` path was already correct; I only routed its `parameters` through the
new helper.
**Upper bound.** Restored: `pyexasol>=2,<3`.
**Version + changelog.** Bumped to `5.0.0` (major) and added a `Breaking
changes` note under the `Changelog` header covering the dropped 1.x support and
the positional-parameter rejection.
**Tests.** Added coverage for the mapping/positional parameter paths and the
list-`sql` handling; `test_run_with_parameters` now uses a mapping, since its
previous positional tuple is rejected by design.
`closes: #69123` is in the description. One heads-up: I could not stand up
the full Airflow toolchain in my environment this round, so I am leaning on CI
here for the integrated mypy and provider tests (ruff format/lint are clean
locally) and watching them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]