表结构
CREATE EXTERNAL TABLE IF NOT EXISTS LocationTable
(
USER_ID BIGINT,
NAME STRING,
STATE STRUCT < DISTRICT ARRAY < ID:BIGINT, NAME:STRING > >
)
我的查询是:
SELECT user_id, name,
district.pos as district_pos,
district.name as district_name,
FROM
locationtable,
locationtable.state.district district
WHERE user_id = '58'
它抛出以下错误。
Error while compiling statement: FAILED: ParseException line 6:20 cannot recognize input near '.' 'district' 'district' in table source
我哪里做错了?
1条答案
按热度按时间2izufjch1#
使用
explode