How come value changes are evaluated different with same results

Hi everyone!

Can someone explain why these two changes are evaluated as different types of changes? The ending results are clearly the same, the values were changed from string to int, but the top change shows the entire value ‘50’ was replaced with 50 , and the bottom change shows only the apostrophes were removed.

I’m guessing it has something to do with them having different datatypes? Like a tinyint compared to an int? I notice in this PR every value with 1 or 2 characters (50, 24, 4, etc) has the full value replaced, but every value with 3 characters (200, 400, 287, etc) shows only the apostrophes replaced.

Screen Shot 2019-11-01 at 2.51.33 PM.png


The diff machinery doesn’t care about datatypes. Everying is text to it :smiley:

This type of diff is called a ‘word diff’ and I guess the preimage needs to be 5 characters or longer for this part of the diff machinery to kick in. Though that’s just a guess, I have no idea about the actual internals.

1 Like

Thanks for the response @seveas. Makese sense it’s all just evaluated as text and not actual types ha 

I assume there’s some efficiency logic once the diff string hits different lengths, but I’m curious exactly what it might be, or why (if simply for machine efficiency).