Data Types

The Simba Apache Hive JDBC Connector supports many common data formats, converting between Hive, SQL, and Java data types.

The following table lists the supported data type mappings.

Hive Type SQL Type Java Type

BIGINT

BIGINT

java.math.BigInteger

BINARY

VARBINARY

byte[]

BOOLEAN

BOOLEAN

Boolean

CHAR

(Available only in Hive 0.13.0 or later)

CHAR

String

DATE

DATE

java.sql.Date

DECIMAL

(In Hive 0.13 and later, you can specify scale and precision when creating tables using the DECIMAL data type.)

DECIMAL

java.math.BigDecimal

DOUBLE

DOUBLE

Double

FLOAT

REAL

Float

INT

INTEGER

Long

SMALLINT

SMALLINT

Integer

TIMESTAMP

TIMESTAMP

java.sql.Timestamp

TINYINT

TINYINT

Short

VARCHAR

(Available only in Hive 0.12.0 or later)

VARCHAR

String

The aggregate types (ARRAY, MAP, STRUCT, and UNIONTYPE) are not yet supported. Columns of aggregate types are treated as VARCHAR columns in SQL and STRING columns in Java.