Affects Version/s: None
Fix Version/s: None
Calcite MOD definition:
Calcite Document description:
.bq MOD(numeric, numeric) Returns the remainder (modulus) of numeric1 divided by numeric2. The result is negative only if numeric1 is negative
In MySQL: https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_mod
Modulo operation. Returns the remainder of N divided by M. We can get the correct value in MOD(34.5,3), MOD(19,6.7) situation.
MOD(34.5,3), mod(19,6.7) -> 1.5 , 5.6.
So, In this JIRA. we should do two thing:
1. Decide whether we are consistent with Mysql.
2. Improve the document, clearly inform the user for the MOD behavior.
Hi, Julian Hyde What do you think? Maybe this is related to implicit conversions. I am not sure. I appreciated if you can tell me your thoughts.