dataset icon indicating copy to clipboard operation
dataset copied to clipboard

fix update_many with new columns

Open medecau opened this issue 10 months ago • 2 comments

fixes a bug where updating many records with new columns and ensuring those columns are created would raise a sqlalchemy.exc.CompileError exception as reported in #409

the pull request includes two new unit-tests:

  1. ensure the bug is fixed
  2. demonstrate the behaviour when new columns are present but the ensure argument is set to False

in making these changes i did not consider the cases under point 2, i'm uncertain what the right behaviour should be under those circumstances

as stated by @4l1fe in #409 this solution may work on other methods

a way to improve the insert_many(), upsert_many(), update_many() methods is to add a new wrapper _sync_columns_many()

i wouldn't mind working on this if there is some indication the work will get merged ping @pudo, @gka

medecau avatar Jan 29 '25 08:01 medecau

Hi @medecau and thanks a lot for your contribution. It's been a while since I last worked on this project, but I'll see if I can get @pudo's attention somehow!

gka avatar Feb 05 '25 12:02 gka

thanks @gka pinged you because i noticed your handle on pypi's page for dataset

medecau avatar Feb 07 '25 04:02 medecau