Description
PostgreSQL, Teradata, SQL Server, DB2 and Presto perform integral division with the / operator.
But Oracle, Vertica, Hive, MySQL and MariaDB perform fractional division with the / operator.
We need add a flag(spark.sql.function.preferIntegralDivision) to control whether to use integral division with the / operator.
Attachments
Issue Links
- relates to
-
SPARK-2659 HiveQL: Division operator should always perform fractional division
- Resolved
-
SPARK-16323 Avoid unnecessary cast when doing integral divide
- Resolved
- links to