kasakrisz commented on a change in pull request #2264:
URL: https://github.com/apache/hive/pull/2264#discussion_r647582032



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java
##########
@@ -1940,39 +2091,38 @@ public boolean isEmpty() {
     }
     @Override
     public void findDeletedRecords(ColumnVector[] cols, int size, BitSet 
selectedBitSet) {
-      if (rowIds == null || compressedOwids == null) {
+      if (rowIds == null || writeIds == null || writeIds.isEmpty()) {
         return;
       }
       // Iterate through the batch and for each (owid, rowid) in the batch
       // check if it is deleted or not.
 
       long[] originalWriteIdVector =
-          cols[OrcRecordUpdater.ORIGINAL_WRITEID].isRepeating ? null
-              : ((LongColumnVector) 
cols[OrcRecordUpdater.ORIGINAL_WRITEID]).vector;
+              cols[OrcRecordUpdater.ORIGINAL_WRITEID].isRepeating ? null

Review comment:
       reverted

##########
File path: 
ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedOrcAcidRowBatchReader.java
##########
@@ -961,26 +966,41 @@ private void testDeleteEventOriginalFiltering2() throws 
Exception {
 
   @Test
   public void testVectorizedOrcAcidRowBatchReader() throws Exception {
+    setupTestData();
+
+    
testVectorizedOrcAcidRowBatchReader(ColumnizedDeleteEventRegistry.class.getName());
+
+    // To test the SortMergedDeleteEventRegistry, we need to explicitly set the
+    // HIVE_TRANSACTIONAL_NUM_EVENTS_IN_MEMORY constant to a smaller value.
+    int oldValue = 
conf.getInt(HiveConf.ConfVars.HIVE_TRANSACTIONAL_NUM_EVENTS_IN_MEMORY.varname, 
1000000);
+    
conf.setInt(HiveConf.ConfVars.HIVE_TRANSACTIONAL_NUM_EVENTS_IN_MEMORY.varname, 
1000);
+    
testVectorizedOrcAcidRowBatchReader(SortMergedDeleteEventRegistry.class.getName());
+
+    // Restore the old value.
+    
conf.setInt(HiveConf.ConfVars.HIVE_TRANSACTIONAL_NUM_EVENTS_IN_MEMORY.varname, 
oldValue);
+  }
+
+  private void setupTestData() throws IOException {
     conf.set("bucket_count", "1");
-      conf.set(ValidTxnList.VALID_TXNS_KEY,
-          new ValidReadTxnList(new long[0], new BitSet(), 1000, 
Long.MAX_VALUE).writeToString());
+    conf.set(ValidTxnList.VALID_TXNS_KEY,
+            new ValidReadTxnList(new long[0], new BitSet(), 1000, 
Long.MAX_VALUE).writeToString());
 
     int bucket = 0;
     AcidOutputFormat.Options options = new AcidOutputFormat.Options(conf)
-        .filesystem(fs)
-        .bucket(bucket)
-        .writingBase(false)
-        .minimumWriteId(1)
-        .maximumWriteId(NUM_OWID)
-        .inspector(inspector)
-        .reporter(Reporter.NULL)
-        .recordIdColumn(1)
-        .finalDestination(root);
+            .filesystem(fs)

Review comment:
       reverted




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to