We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f1ce80 commit d28cac5Copy full SHA for d28cac5
sqlalchemy_bigquery/base.py
@@ -471,8 +471,14 @@ def visit_bindparam(
471
# The NullType/known-type check has to do with some extreme
472
# edge cases having to do with empty in-lists that get special
473
# hijinks from SQLAlchemy that we don't want to disturb. :)
474
+ #
475
+ # Note that we do *not* want to overwrite the "real" bindparam
476
+ # here, because then we can't do a recompile later (e.g., first
477
+ # print the statment, then execute it). See issue #357.
478
479
if getattr(bindparam, "expand_op", None) is not None:
480
assert bindparam.expand_op.__name__.endswith("in_op") # in in
481
+ bindparam = bindparam._clone(maintain_key=True)
482
bindparam.expanding = False
483
unnest = True
484
0 commit comments