You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace property descriptors with conventional bindparam_string override
The previous revision used property descriptors (with a no-op setter)
to force bindtemplate / compilation_bindtemplate. That pattern has
zero precedent in SQLAlchemy's built-in dialects (none of MySQL,
PostgreSQL, SQLite, MSSQL, or Oracle override these templates), and
making the instance attribute un-settable is subtle enough to slow
down a future reader.
Swap to the conventional shape Oracle uses (cx_oracle.py:781):
override bindparam_string for the compile-time render path. For the
execute-time IN-clause expansion path — which bypasses
bindparam_string and reads self.bindtemplate directly from
_literal_execute_expanding_parameter — plain attribute assignment in
__init__ after super() is sufficient, because super() sets
self.bindtemplate near the end of its __init__ (line 1466 in
sqlalchemy 2.0.43) after compilation has already run with
compilation_bindtemplate.
Result: two well-understood extension points, no descriptors, same
end-to-end behavior verified in the comprehensive empirical suite
(29/29 passing against the live warehouse, including the IN-clause
post-compile expansion case that motivated the two-path coverage).
Co-authored-by: Isaac
Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
0 commit comments