The Math and Trig page at http://drill.apache.org/docs/math-and-trig/ refers to data types UINT1, UINT2, UINT4, UINT8, FLOAT4, FLOAT8, DECIMAL9, and DECIMAL18.
However, these do not seem to be Drill SQL types, at least based on their behavior in CAST expressions. For example:
0: jdbc:drill:zk=local> SELECT CAST( 1 as UINT4 ) FROM INFORMATION_SCHEMA.CATALOGS;
Mar 31, 2015 9:47:51 PM org.eigenbase.sql.validate.SqlValidatorException <init>
SEVERE: org.eigenbase.sql.validate.SqlValidatorException: Unknown datatype name 'UINT4'
Mar 31, 2015 9:47:51 PM org.eigenbase.util.EigenbaseException <init>
SEVERE: org.eigenbase.util.EigenbaseContextException: From line 1, column 19 to line 1, column 23: Unknown datatype name 'UINT4'
Query failed: SqlValidatorException: Unknown datatype name 'UINT4'
Error: exception while executing query: Failure while executing query. (state=,code=0)
Those names seem to refer to Drill internal types (or types used in the storage plugin interface), not Drill SQL types.
Since the Math and Trig page deals with the SQL interface, it should be in terms of Drill SQL types, not Drill internal/non-SQL types.
- The page says "INT" (a syntax-only shortcut) rather than "INTEGER" (the actual name of the type).
- The page lists SMALLINT but not TINYINT. Is that inconsistency intended?