我正在尝试使用 Hive SQL 对两个表进行连接,但总是遇到语义分析错误
hive> SELECT COUNT(*) FROM Table1 JOIN Table2 ON
(Table1.BUYER_ID = Table2.UID);
FAILED: Error in semantic analysis: line 1:76 Invalid Table Alias
Table1
表结构是-
CREATE EXTERNAL TABLE IF NOT EXISTS Table1
(
ITEM_ID BIGINT,
CREATED_TIME STRING,
BUYER_ID BIGINT
)
CREATE EXTERNAL TABLE IF NOT EXISTS Table2
(
UID BIGINT,
PURCHASED_ITEM ARRAY<STRUCT<PRODUCT_ID: BIGINT,TIMESTAMPS:STRING>>
)
任何建议为什么会发生?