Describe the bug
Check isNonNegative() doesn't work correctly cause of conversion problem. This function uses satisfies() function and in this MR #312 authour decided to use DECIMAL(20,10) with precision = 20 and scale = 10. Integer digits available to store is 20 - 10 = 10 digits, so the maximum value is 10⁹ - 1 = 999,999,999. Maximum bigInt value is 9,223,372,036,854,775,807 (19 digits) that's why all digits X > 999,999,999 and X < -999,999,999 are converted to 0.0 with COALESCE(CAST($column AS DECIMAL(20,10)), 0.0) function
To Reproduce
isNonNegative() uses satisfies() function, so you may use the expression COALESCE(CAST($column AS DECIMAL(20,10)), 0.0) and any value insted of $column to see the results
Expected behavior
For the bigint data type it's better to convert using DECIMAL(38,0) expression
For data types using floating-point it's better to create another check with decimal and scale parameters in it, e.g. isNonNegativeDecimal()

Describe the bug
Check
isNonNegative()doesn't work correctly cause of conversion problem. This function usessatisfies()function and in this MR #312 authour decided to useDECIMAL(20,10)with precision = 20 and scale = 10. Integer digits available to store is20 - 10 = 10digits, so the maximum value is10⁹ - 1 = 999,999,999. Maximum bigInt value is9,223,372,036,854,775,807 (19 digits)that's why all digits X > 999,999,999 and X < -999,999,999 are converted to 0.0 withCOALESCE(CAST($column AS DECIMAL(20,10)), 0.0)functionTo Reproduce
isNonNegative()usessatisfies()function, so you may use the expressionCOALESCE(CAST($column AS DECIMAL(20,10)), 0.0)and any value insted of $column to see the resultsExpected behavior
For the bigint data type it's better to convert using
DECIMAL(38,0)expressionFor data types using floating-point it's better to create another check with
decimalandscaleparameters in it, e.g.isNonNegativeDecimal()