/
(slash sign) operator
Returns dividend
divided by divisor
.
Returns
If both dividend
and divisor
are DECIMAL, the result is DECIMAL.
If dividend
is a year-month interval, the result is an INTERVAL YEAR TO MONTH
.
If divident
is a day-time interval, the result is an INTERVAL DAY TO SECOND
.
In all other cases, a DOUBLE.
If the divisor
is 0, the operator returns a DIVIDE_BY_ZERO error.
Use try_divide to return NULL
on division-by-zero.
Note
If spark.sql.ansi.enabled is false
the function returns NULL
instead of an error division by 0.