简体   繁体   English

Spark SQL(版本1.1.0)是否支持配置单元索引?

[英]Does Spark SQL (version 1.1.0) supports hive index?

I used the spark SQL connect hive, basic query is OK, but was unable to create the index, will spark SQL support indexes? 我使用了spark SQL connect配置单元,基本查询还可以,但是无法创建索引,spark SQL是否支持索引?

DROP TABLE test_tabe;
CREATE  TABLE test_tabe
(
....
,area   STRING
...
)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
STORED AS RCFILE
--STORED AS SEQUENCEFILE
;
CREATE INDEX idx_compact_index ON TABLE test_tabe (area) AS 'COMPACT' WITH DEFERRED REBUILD

#!!!!Execute always,no error,spark web page no corresponding job !!!!
ALTER INDEX idx_compact_index ON test_tabe REBUILD;

insert overwrite table test.test_tabe select * from test.new_mkt_browse_label_10m

Thanks. 谢谢。

Hive indexes are not supported in spark. spark不支持配置单元索引。 They are less important because spark's in memory computation. 它们不太重要,因为spark在内存计算中。 By any chance have you run comparisons between indexed hive queries vs similar queries in spark? 您是否有机会在带索引的配置单元查询与Spark中的类似查询之间进行比较? You can checkout more information on indexing not being implemented here 您可以在此处查看有关未实现索引的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM