Support for Hive JDBC connector
Cloudera Data Warehouse offers support for a read-only Hive JDBC connector
designed to facilitate SELECT operations on Hive sources. It optimizes query
execution performance by pushing down filters, limits, expressions, and aggregates directly to
the source database, taking full advantage of the underlying Hive engine's
capabilities.
Key features and capabilities
- Supported data types
-
The connector supports precise schema discovery and runtime query handling through type-safe mappings between the Trino and Hive data layers:
- Numeric:
TINYINT,SMALLINT,INTEGER,BIGINT,FLOAT,REAL,DOUBLE, andDECIMAL(p, s)orNUMERIC(p, s) - Character:
CHAR,VARCHAR(bounded), andSTRING(unbounded) - Date or Time:
DATEandTIMESTAMP - Complex:
ARRAY,MAP, andSTRUCT(unsupported)
- Numeric:
- Constraints related to DATE and TIMESTAMP data types
-
The temporal data types have specific timezone and precision semantics that differ across engines, requiring the connector to explicitly use custom logic for all date and timestamp mappings. The core issue with legacy JDBC drivers is the silent application of the JVM's local timezone when calling
ResultSet.getDate(). As a result, pushing down a condition directly to the source database can yield incorrect or inconsistent query results, shifting historical dates by a full day and causing mismatched data issues during predicate pushdowns.Workaround (Date): The connector bypasses
java.sql.Dateentirely, opting to read the date as a raw String from Hive (example, 2026-06-11). It then applies a strictDateTimeFormatterand converts it directly to Trino epoch days, guaranteeing strict correctness and cross-engine uniformity during data extraction.Workaround (Timestamp): The connector bypasses standard driver-level timestamp extraction, opting to read timestamps into
LocalDateTime. It then manually rounds them to match Trino'sMAX_SHORT_PRECISION, guaranteeing strict correctness and cross-engine uniformity during data extraction. - Query optimization
- To maximize cluster execution efficiency and balance engine workloads, query
operations are evaluated and selectively pushed down to the source database based on the
verified Trino capabilities matrix:
Full push down:
The connector supports pushdown for a number of operations:
- Predicate pushdown
- Dynamic filter
- Limit pushdown
- Join pushdown
Aggregate pushdown for the following functions:
avg()count(), alsocount(distinct x)max()min()sum()
Additionally, pushdown is supported for advanced statistical metrics with the following functions:
stddev()variance()covariance()correlation()Regression
Not push down:
The connector does not support pushdown for the following:
- Top-N pushdown
- Join pushdown (
IS DISTINCT FROM) - Dereference pushdown
- Limitations and unsupported operations
-
This connector is strictly read-only. Attempting any of the following will trigger a
NOT_SUPPORTEDexception:- DML operations:
INSERTUPDATE,DELETEandMERGEare blocked. - DDL operations:
CREATE SCHEMA,CREATE TABLE,DROP SCHEMA, andRENAME SCHEMAare not permitted. - JDBC connection pooling: Configuration and reuse metrics for integrated connection pooling are currently unsupported for the Hive JDBC connector.
- DML operations:
