[ https://issues.apache.org/jira/browse/HIVE-11725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14728928#comment-14728928 ]
Rajesh Balamohan commented on HIVE-11725: ----------------------------------------- Attaching detailed console output for reference. Detailed output: {noformat} SELECT count(*) FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < 65000000; INFO : Session is already open DEBUG : No local resources to process (other than hive-exec) DEBUG : DagInfo: {"context":"Hive","description":"SELECT count(*) FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < 65000000"} DEBUG : Setting Tez DAG access for hive INFO : INFO : Status: Running (Executing on YARN cluster with App id application_1439860407967_0539) INFO : Map 1: 0/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 1/1 Reducer 2: 0(+1)/1 INFO : Map 1: 1/1 Reducer 2: 1/1 +-----------+--+ | _c0 | +-----------+--+ | 49990192 | +-----------+--+ 0: jdbc:hive2://machine:10002/rajesh> DELETE FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < 20000000; INFO : Session is already open DEBUG : No local resources to process (other than hive-exec) DEBUG : DagInfo: {"context":"Hive","description":"DELETE FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < 20000000"} DEBUG : Setting Tez DAG access for hive INFO : INFO : Status: Running (Executing on YARN cluster with App id application_1439860407967_0539) INFO : Map 1: 0/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 0(+1)/1 Reducer 2: 0/256 INFO : Map 1: 1/1 Reducer 2: 0/256 INFO : Map 1: 1/1 Reducer 2: 0(+1)/256 INFO : Map 1: 1/1 Reducer 2: 1(+1)/256 INFO : Map 1: 1/1 Reducer 2: 2(+1)/256 INFO : Map 1: 1/1 Reducer 2: 3(+0)/256 INFO : Map 1: 1/1 Reducer 2: 3(+1)/256 INFO : Map 1: 1/1 Reducer 2: 4(+1)/256 INFO : Map 1: 1/1 Reducer 2: 5(+1)/256 INFO : Map 1: 1/1 Reducer 2: 6(+85)/256 INFO : Map 1: 1/1 Reducer 2: 6(+203)/256 INFO : Map 1: 1/1 Reducer 2: 7(+215)/256 INFO : Map 1: 1/1 Reducer 2: 8(+214)/256 INFO : Map 1: 1/1 Reducer 2: 9(+214)/256 INFO : Map 1: 1/1 Reducer 2: 10(+214)/256 INFO : Map 1: 1/1 Reducer 2: 10(+215)/256 INFO : Map 1: 1/1 Reducer 2: 11(+214)/256 INFO : Map 1: 1/1 Reducer 2: 21(+207)/256 INFO : Map 1: 1/1 Reducer 2: 55(+196)/256 INFO : Map 1: 1/1 Reducer 2: 164(+88)/256 INFO : Map 1: 1/1 Reducer 2: 194(+62)/256 INFO : Map 1: 1/1 Reducer 2: 195(+61)/256 INFO : Map 1: 1/1 Reducer 2: 209(+47)/256 INFO : Map 1: 1/1 Reducer 2: 230(+26)/256 INFO : Map 1: 1/1 Reducer 2: 251(+5)/256 INFO : Map 1: 1/1 Reducer 2: 256/256 INFO : Loading data to table rajesh.lineitem_acid_bucket from hdfs://machine.xyz.com:8020/apps/hive/warehouse/rajesh.db/lineitem_acid_bucket/.hive-staging_hive_2015-09-03_11-24-43_243_3903826613656892739-1/-ext-10000 INFO : Table rajesh.lineitem_acid_bucket stats: [numFiles=2368, numRows=84989293, totalSize=2921444884, rawDataSize=0] SELECT count(*) FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < 65000000; INFO : Session is already open DEBUG : No local resources to process (other than hive-exec) DEBUG : DagInfo: {"context":"Hive","description":"SELECT count(*) FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < 65000000"} DEBUG : Setting Tez DAG access for hive INFO : INFO : Status: Running (Executing on YARN cluster with App id application_1439860407967_0539) INFO : Map 1: 0/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 0(+1)/1 Reducer 2: 0/1 INFO : Map 1: 1/1 Reducer 2: 0/1 INFO : Map 1: 1/1 Reducer 2: 0(+1)/1 INFO : Map 1: 1/1 Reducer 2: 1/1 +-----------+--+ | _c0 | +-----------+--+ | 44992181 | +-----------+--+ {noformat} > Delete on ACID enabled table provides wrong results > --------------------------------------------------- > > Key: HIVE-11725 > URL: https://issues.apache.org/jira/browse/HIVE-11725 > Project: Hive > Issue Type: Bug > Reporter: Rajesh Balamohan > > This is based on the master codebase (last commit: > 492c8b1d88ffcb68ba4f77a3a49ae8fc768cdd7c) > Created a table with TBLPROPERTIES("transactional"="true", > "NO_AUTO_COMPACTION"="true"). Populated bunch of records in the table and > deleted few of them. Select query after delete does not seem to consider the > deleted records. > {noformat} > set hive.support.concurrency=true; > set hive.enforce.bucketing=true; > set hive.exec.dynamic.partition.mode=nonstrict; > set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; > set hive.compactor.initiator.on=false; > set hive.compactor.worker.threads=0; > DROP TABLE `lineitem_acid_bucket`; > CREATE TABLE `lineitem_acid_bucket`( > `l_orderkey` bigint, > `l_partkey` bigint, > `l_suppkey` bigint, > `l_linenumber` bigint, > `l_quantity` double, > `l_extendedprice` double, > `l_discount` double, > `l_tax` double, > `l_returnflag` string, > `l_linestatus` string, > `l_shipdate` string, > `l_commitdate` string, > `l_receiptdate` string, > `l_shipinstruct` string, > `l_shipmode` string, > `l_comment` string) > CLUSTERED BY (l_orderkey) > INTO 256 BUCKETS STORED AS ORC TBLPROPERTIES("transactional"="true", > "NO_AUTO_COMPACTION"="true"); <-- intentionally enabled NO_AUTO_COMPACTION, > so that user can have control on compaction > -- Populate some data from master lineitem table which has data > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > 0 > AND l_orderkey < 10000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 10000001 AND l_orderkey < 20000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 20000001 AND l_orderkey < 30000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 30000001 AND l_orderkey < 40000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 40000001 AND l_orderkey < 50000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 50000001 AND l_orderkey < 60000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 60000001 AND l_orderkey < 70000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 70000001 AND l_orderkey < 80000000; > INSERT INTO lineitem_acid_bucket SELECT * FROM lineitem WHERE l_orderkey > > 80000001 AND l_orderkey < 90000000; > SELECT count(*) FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and > l_orderkey < 65000000; > 49990192 > DELETE FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and l_orderkey < > 20000000; > INFO : Table rajesh.lineitem_acid_bucket stats: [numFiles=2368, > numRows=84989293, totalSize=2921444884, rawDataSize=0] > Run the same select query again > SELECT count(*) FROM lineitem_acid_bucket WHERE l_orderkey > 15000001 and > l_orderkey < 65000000; > 44992181 <--- wrong value > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)