Database Reference
In-Depth Information
Built-in function support in Impala
Impala supports lots of built-in functions in various categories, and these functions
are used to perform several types of data transformation operations, such as math-
ematical calculations, string manipulations, and data calculations. You can use built-in
functions with SQL queries to avoid post-processing of data; by using these functions
you can get fully-formatted, calculated, and type changed data as results. Aggregate
functions ignore NULL values rather than returning a NULL result.
These built-in functions can be used directly with a SELECT statement, as shown in
the following example:
SELECT ABS(-1);
SELECT CONCAT('NFL ', 'American Football');
SELECT POWER(3,3);
SELECT CONCAT('State = ',state_name) FROM states
WHERE population > 10000000;
SELECT SIN(null);
SELECT POWER(2,null);
SELECT MAX(wheels), AVG(windows) FROM
automobiles WHERE year <1950;
Impala supports the following categories of built-in functions:
• Mathematical functions
• String functions
• Conditional functions
• Date and time functions
• Type conversation functions
• Aggregate functions (which we have already discussed in previous sections)
Now, we will take a look at a few functions from each category and their usage pat-
terns. Let's starts with mathematical functions, described in the following table:
Search WWH ::




Custom Search