@@ -230,14 +230,14 @@ def visit_update(self, update_stmt, **kw):
230
230
update_stmt , table_text
231
231
)
232
232
233
- # CrateDB amendment .
233
+ # CrateDB patch .
234
234
crud_params = self ._get_crud_params (update_stmt , ** kw )
235
235
236
236
text += table_text
237
237
238
238
text += ' SET '
239
239
240
- # CrateDB amendment begin.
240
+ # CrateDB patch begin.
241
241
include_table = extra_froms and \
242
242
self .render_table_with_column_in_update_from
243
243
@@ -255,7 +255,7 @@ def visit_update(self, update_stmt, **kw):
255
255
set_clauses .append (k + ' = ' + self .process (bindparam ))
256
256
257
257
text += ', ' .join (set_clauses )
258
- # CrateDB amendment end.
258
+ # CrateDB patch end.
259
259
260
260
if self .returning or update_stmt ._returning :
261
261
if not self .returning :
@@ -393,7 +393,7 @@ def visit_update_14(self, update_stmt, **kw):
393
393
update_stmt , update_stmt .table , render_extra_froms , ** kw
394
394
)
395
395
396
- # CrateDB amendment .
396
+ # CrateDB patch .
397
397
crud_params = _get_crud_params_14 (
398
398
self , update_stmt , compile_state , ** kw
399
399
)
@@ -413,7 +413,7 @@ def visit_update_14(self, update_stmt, **kw):
413
413
414
414
text += " SET "
415
415
416
- # CrateDB amendment begin.
416
+ # CrateDB patch begin.
417
417
include_table = extra_froms and \
418
418
self .render_table_with_column_in_update_from
419
419
@@ -431,7 +431,7 @@ def visit_update_14(self, update_stmt, **kw):
431
431
set_clauses .append (clause )
432
432
433
433
text += ', ' .join (set_clauses )
434
- # CrateDB amendment end.
434
+ # CrateDB patch end.
435
435
436
436
if self .returning or update_stmt ._returning :
437
437
if self .returning_precedes_values :
@@ -610,10 +610,23 @@ def _get_crud_params_14(compiler, stmt, compile_state, **kw):
610
610
kw ,
611
611
)
612
612
613
- # CrateDB amendment.
614
- # The rewriting logic in `rewrite_update` and `visit_update` needs
615
- # adjustments here in order to prevent `sqlalchemy.exc.CompileError:
616
- # Unconsumed column names: characters_name, data['nested']`
613
+ # CrateDB patch.
614
+ #
615
+ # This sanity check performed by SQLAlchemy currently needs to be
616
+ # deactivated in order to satisfy the rewriting logic of the CrateDB
617
+ # dialect in `rewrite_update` and `visit_update`.
618
+ #
619
+ # It can be quickly reproduced by activating this section and running the
620
+ # test cases::
621
+ #
622
+ # ./bin/test -vvvv -t dict_test
623
+ #
624
+ # That croaks like::
625
+ #
626
+ # sqlalchemy.exc.CompileError: Unconsumed column names: characters_name, data['nested']
627
+ #
628
+ # TODO: Investigate why this is actually happening and eventually mitigate
629
+ # the root cause.
617
630
"""
618
631
if parameters and stmt_parameter_tuples:
619
632
check = (
0 commit comments