Skip to content

Commit

Permalink
fix BQ testGetUpdateWithPkCommandConvertValues using IS DISTINCT FROM…
Browse files Browse the repository at this point in the history
… everywhere
  • Loading branch information
jirkasemmler committed Nov 19, 2024
1 parent 6e6b173 commit be67a87
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,12 @@ public function getUpdateWithPkCommandConvertValuesProvider(): Generator
yield 'typed' => [ // nothing is converted
BigqueryImportOptions::USING_TYPES_USER,
// phpcs:ignore
'UPDATE `import_export_test_schema`.`import_export_test_test` AS `dest` SET `col1` = `src`.`col1`, `col2` = `src`.`col2` FROM `import_export_test_schema`.`stagingTable` AS `src` WHERE `dest`.`col1` = `src`.`col1` '
'UPDATE `import_export_test_schema`.`import_export_test_test` AS `dest` SET `col1` = `src`.`col1`, `col2` = `src`.`col2` FROM `import_export_test_schema`.`stagingTable` AS `src` WHERE `dest`.`col1` = `src`.`col1` AND (`dest`.`col1` IS DISTINCT FROM `src`.`col1` OR `dest`.`col2` IS DISTINCT FROM `src`.`col2`)'
];
yield 'string' => [
BigqueryImportOptions::USING_TYPES_STRING,
// phpcs:ignore
'UPDATE `import_export_test_schema`.`import_export_test_test` AS `dest` SET `col1` = IF(`src`.`col1` = \'\', NULL, `src`.`col1`), `col2` = COALESCE(`src`.`col2`, \'\') FROM `import_export_test_schema`.`stagingTable` AS `src` WHERE `dest`.`col1` = COALESCE(`src`.`col1`, \'\') ',
'UPDATE `import_export_test_schema`.`import_export_test_test` AS `dest` SET `col1` = IF(`src`.`col1` = \'\', NULL, `src`.`col1`), `col2` = COALESCE(`src`.`col2`, \'\') FROM `import_export_test_schema`.`stagingTable` AS `src` WHERE `dest`.`col1` = COALESCE(`src`.`col1`, \'\') AND (`dest`.`col1` IS DISTINCT FROM `src`.`col1` OR `dest`.`col2` IS DISTINCT FROM `src`.`col2`)',
];
}

Expand Down

0 comments on commit be67a87

Please sign in to comment.