It is not possible to create an index for an element of a complex data type. The reason is that the hive does not provide a separate column for an element of a complex data type, and indexing is possible only in a table column. To better understand below.
Hive - . "WHERE tab1.col1 = 10" . col1, .
, , .
CREATE INDEX employees_index
ON TABLE employees (address)
AS ‘org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler’
WITH DEFERRED REBUILD
IN TABLE employees_index_table
PARTITIONED BY (country,name)
COMMENT ‘index based on complex column’;
, ,
, :
select * from employees where address.street='baker';
( STRUCT)
(, : , : , : XYZ, zip: 84902)
.street = baker
, .
.