dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.58k stars 498 forks source link

UPDATE IGNORE ... JOIN queries fail with "failed to apply rowHandler" error #7986

Closed arvidfm closed 2 months ago

arvidfm commented 2 months ago

All UPDATE IGNORE ... JOIN queries seem to fail with the error:

failed to apply rowHandler to updateJoin, unknown type: *plan.CheckpointingTableEditorIter

Looks like this specific type is missing from the switch here: https://github.com/dolthub/go-mysql-server/blob/781cf10c50c0ecd1e3884c56b71587c51ccb7f77/sql/rowexec/dml.go#L373-L385

MWE:

CREATE TABLE a(id INT PRIMARY KEY, value INT);
UPDATE IGNORE a JOIN a a2 ON a.id = a2.id SET a.value = 0;
timsehn commented 2 months ago

I'm pretty sure this means this is unsupported. We should make a better error message and then support the syntax.

jycor commented 2 months ago

Hey @arvidfm, thanks for reporting this issue!

You were right, we were just missing that switch statement. The fix has been merged into GMS, and is making its way to dolt main. Expect a release with the fix sometime time week.