From issues-return-184784-archive-asf-public=cust-asf.ponee.io@hive.apache.org Tue Apr 7 22:25:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E2A18180663 for ; Wed, 8 Apr 2020 00:25:02 +0200 (CEST) Received: (qmail 81595 invoked by uid 500); 7 Apr 2020 22:25:02 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 81562 invoked by uid 99); 7 Apr 2020 22:25:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2020 22:25:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 534CEE044E for ; Tue, 7 Apr 2020 22:25:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id C571B7802FF for ; Tue, 7 Apr 2020 22:25:00 +0000 (UTC) Date: Tue, 7 Apr 2020 22:25:00 +0000 (UTC) From: "Sungwoo (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-23114) Insert overwrite with dynamic partitioning is not working correctly with direct insert MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-23114?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1707= 7612#comment-17077612 ]=20 Sungwoo commented on HIVE-23114: -------------------------------- Hello [~kuczoram], I tried this combination: HIVE-21164 (ffee30) + HIVE-22832 + HIVE-23114.2.p= atch. I tested with 100GB dataset, and the ORC database is now loaded okay.= You can see that the size of catalog_returns is 911MB. {code:sh} $ hdfs dfs -du -h /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/ 7.6 K 22.9 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= all_center 722.2 K 2.1 M /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= atalog_page 911.1 M 2.7 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= atalog_returns 9.0 G 27.0 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= atalog_sales 73.9 M 221.8 M /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= ustomer 12.4 M 37.3 M /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= ustomer_address 137.1 K 411.3 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/c= ustomer_demographics 348.5 K 1.0 M /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/d= ate_dim 1.5 K 4.4 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/h= ousehold_demographics 881 2.6 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/i= ncome_band 846.0 M 2.5 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/i= nventory 13.5 M 40.5 M /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/i= tem 30.6 K 91.9 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/p= romotion 1.4 K 4.2 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/r= eason 1.8 K 5.3 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/s= hip_mode 27.4 K 82.2 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/s= tore 1.4 G 4.2 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/s= tore_returns 13.1 G 39.3 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/s= tore_sales 125.1 K 375.4 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/t= ime_dim 2.9 K 8.7 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/w= arehouse 22.7 K 68.1 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/w= eb_page 437.8 M 1.3 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/w= eb_returns 4.8 G 14.4 G /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/w= eb_sales 6.3 K 18.8 K /tmp/hivemr3/warehouse/tpcds_bin_partitioned_orc_100.db/w= eb_site {code} Let me report the result of running TPC-DS queries later. (There is a probl= em with my setup for testing.) > Insert overwrite with dynamic partitioning is not working correctly with = direct insert > -------------------------------------------------------------------------= ------------- > > Key: HIVE-23114 > URL: https://issues.apache.org/jira/browse/HIVE-23114 > Project: Hive > Issue Type: Bug > Reporter: Marta Kuczora > Assignee: Marta Kuczora > Priority: Major > Attachments: HIVE-23114.1.patch, HIVE-23114.2.patch > > > This is a follow-up Jira for the [conversation|https://issues.apache.org/= jira/browse/HIVE-21164?focusedCommentId=3D17059280&page=3Dcom.atlassian.jir= a.plugin.system.issuetabpanels:comment-tabpanel#comment-17059280] in=C2=A0H= IVE-21164 > Doing an insert overwrite from a multi-insert statement with dynamic par= titioning will give wrong results for ACID tables when 'hive.acid.direct.in= sert.enabled' is true or for insert-only tables. > Reproduction: > {noformat} > set hive.acid.direct.insert.enabled=3Dtrue; > set hive.support.concurrency=3Dtrue; > set hive.txn.manager=3Dorg.apache.hadoop.hive.ql.lockmgr.DbTxnManager; > set hive.vectorized.execution.enabled=3Dfalse; > set hive.stats.autogather=3Dfalse; > create external table multiinsert_test_text (a int, b int, c int) stored = as textfile; > insert into multiinsert_test_text values (1111, 11, 1111), (2222, 22, 111= 1), (3333, 33, 2222), (4444, 44, NULL), (5555, 55, NULL); > create table multiinsert_test_acid (a int, b int) partitioned by (c int) = stored as orc tblproperties('transactional'=3D'true'); > create table multiinsert_test_mm (a int, b int) partitioned by (c int) st= ored as orc tblproperties('transactional'=3D'true', 'transactional_properti= es'=3D'insert_only'); > from multiinsert_test_text a > insert overwrite table multiinsert_test_acid partition (c) > select > a.a, > a.b, > a.c > where a.c is not null > insert overwrite table multiinsert_test_acid partition (c) > select > a.a, > a.b, > a.c > where a.c is null; > select * from multiinsert_test_acid; > from multiinsert_test_text a > insert overwrite table multiinsert_test_mm partition (c) > select > a.a, > a.b, > a.c > where a.c is not null > insert overwrite table multiinsert_test_mm partition (c) > select > a.a, > a.b, > a.c > where a.c is null; > select * from multiinsert_test_mm; > {noformat} > The result of these steps can be different, it depends on the execution o= rder of the FileSinkOperators of the insert overwrite statements. It can ha= ppen that an error occurs due to manifest file collision, it can happen tha= t no error occurs but the result will be incorrect. > Running the same insert query with an external table of with and ACID ta= ble with 'hive.acid.direct.insert.enabled=3Dfalse' will give the follwing r= esult: > {noformat} > 1111 11 1111 > 2222 22 1111 > 3333 33 2222 > 4444 44 NULL > 5555 55 NULL > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)