0
我正在用這個查詢做什麼錯,每當我嘗試執行它時,我總是得到錯誤。語義分析錯誤
SELECT
t1.buyer_id,
t1.item_id,
t1.created_time,
t2.product_id,
t2.timestamps
FROM
TestingTable1 t1
JOIN
(
SELECT
user_id,
prod_and_ts.product_id as product_id,
prod_and_ts.timestamps as timestamps
FROM
TestingTable2
LATERAL VIEW explode(purchased_item) exploded_table as prod_and_ts
) t2
ON(t1.buyer_id = t2.user_id)
WHERE
(t1.item_id <> t2.product_id)
OR (unix_timestamp(t1.created_time) <> t2.timestamps);
這是錯誤我GET-
FAILED: Error in semantic analysis: line 13:6 Invalid Table Alias or
Column Reference prod_and_ts
根據你我需要做什麼改變?對不起,我無法理解。 – ferhan 2012-07-11 05:45:47
這樣的語法,但它應該更正您的多列結果。 SELECT user_id,product_id FROM TestingTable2 LATERAL VIEW爆炸(purchased_item)exploded_table作爲product_id – AlexT 2012-07-11 06:46:41