[PDI-12892]: Fix overflow error on int/date compare
Merge pull request #808 from mattyb149/PDI-12892-5.2

[PDI-12892] 5.2 backport: Fix overflow error on int/date compare