Primitive type과 Complex type으로 나뉘며,
Array와 Map은 자바와 동일하며, Struct의 필드는 어떤 타입이든 집합으로 가질수 있음
Complex type은 타입 중첩을 허용함.
형변환은 묵시적, 명시적
명시적은 cast(cname as TYPE)으로 변환
Numeric Types
TINYINT
(1-byte signed integer, from-128
to127
)SMALLINT
(2-byte signed integer, from-32,768
to32,767
)-
INT/INTEGER (4-byte signed integer, from -2,147,483,648 to 2,147,483,647)
BIGINT
(8-byte signed integer, from-9,223,372,036,854,775,808
to9,223,372,036,854,775,807
)FLOAT
(4-byte single precision floating point number)DOUBLE
(8-byte double precision floating point number)-
DOUBLE PRECISION (alias for DOUBLE, only available starting with Hive 2.2.0)
DECIMAL
NUMERIC
(same asDECIMAL
, starting with Hive 3.0.0)
Date/Time Types
TIMESTAMP
(Note: Only available starting with Hive 0.8.0)DATE
(Note: Only available starting with Hive 0.12.0)INTERVAL
(Note: Only available starting with Hive 1.2.0)
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
'IT기술관련 > 빅데이터관련' 카테고리의 다른 글
HIVE 저장 포맷 (1) | 2018.03.27 |
---|