kitchen_sync icon indicating copy to clipboard operation
kitchen_sync copied to clipboard

Hash doesn't match if string expression used for numeric column

Open willbryant opened this issue 6 years ago • 1 comments

Sort of a technicality, but if there's a numeric column and a filter file used with a replace option, this will work normally:

numtest:
  replace:
    val: "10"

But this won't:

numtest:
  replace:
    val: "'10'"

In the second case, the database will tell KS the resultset column has a string type not an integer type, and so it will be serialised as strings - so differently to the current column values found in the 'to' end table, which will always be serialised as integers. As a result, the hashes won't match.

This doesn't really cause any problems as such, but it's inefficient because the hashes will never match and so the whole table will get reloaded.

willbryant avatar May 25 '19 00:05 willbryant

On MySQL, this also occurs if you supply any expression for a boolean field, even a correct boolean one, and there is no way to turn it into a boolean type using CAST either.

willbryant avatar Feb 21 '20 07:02 willbryant