FangBO created HIVE-26872:
-----------------------------

             Summary: INSERT UNION with LATERAL  VIEW does not produce result
                 Key: HIVE-26872
                 URL: https://issues.apache.org/jira/browse/HIVE-26872
             Project: Hive
          Issue Type: Bug
          Components: Tez
    Affects Versions: 3.1.2, 2.3.9
            Reporter: FangBO


{code:java}
// code placeholder

DROP TABLE union_test;
CREATE TABLE union_test(id INT) PARTITIONED BY (`dt` STRING);

DROP TABLE json_src;
CREATE TABLE json_src(message STRING) PARTITIONED BY (`dt` STRING);

INSERT OVERWRITE TABLE json_src PARTITION(dt='1219') VALUES('{"id":1}');
INSERT OVERWRITE TABLE json_src PARTITION(dt='1220') VALUES('{"id":2}');


INSERT OVERWRITE TABLE union_test PARTITION (dt='1221')
SELECT id FROM json_src LATERAL  VIEW json_tuple(message, 'id') b AS id WHERE 
dt='1219'
UNION ALL
SELECT id FROM json_src LATERAL  VIEW json_tuple(message, 'id') b AS id WHERE 
dt='1220'
; {code}
The script above does not produce data in partition dt='1221'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to