Impala supports the following conditional functions for testing equality, comparison operators, and nullity:
In this form of the
Although this example is split across multiple lines, you can put any or all parts
of a
Small
,
Medium
and Large
based on ranges. Then subsequent parts of the query
might aggregate based on the transformed values, such as how many values are
classified as small, medium, or large. You can also use
By using operators such as
Because this flexible form of the
Although this example is split across multiple lines, you can put any or all parts
of a
Return type: Same as the first argument with the following exceptions:
The following example translates numeric day values into weekday names, such as 1 to Monday, 2 to Tuesday, etc.
Return type: Same as the
Same as the
Similar to
Same as the
Similar to
Same as the
Similar to
Compatibility notes: Equivalent to the
Return type: Same as the first argument value
Same as the
Similar to
Same as the
The converse of
Usage notes: This function is effectively shorthand for a
It is commonly used in division expressions, to produce a
You might also use it for compatibility with other database systems that support the
same
Usage notes: Used to avoid error conditions such as divide-by-zero in numeric
calculations. Serves as shorthand for a more elaborate
Return type: Same type as the input argument
Same as the
The converse of
Equivalent to the
Return type: Same as the first argument value
Equivalent to the
Return type: Same as the first argument value
Usage notes: Used to avoid unexpected results due to unexpected propagation
of
Return type: Same type as the input argument