private void addSplitUpdateEvent(int operation, long currentWriteId, long rowId, Object row)
      throws IOException {
    if (operation == INSERT_OPERATION) {
      // Just insert the record in the usual way, i.e., default to the simple behavior.
      addSimpleEvent(operation, currentWriteId, rowId, row);
      return;
    }
    this.operation.set(operation);
    this.currentWriteId.set(currentWriteId);
    Object rowValue = rowInspector.getStructFieldData(row, recIdField);
    long originalWriteId = origWriteIdInspector.get(
            recIdInspector.getStructFieldData(rowValue, originalWriteIdField));
    rowId = rowIdInspector.get(
            recIdInspector.getStructFieldData(rowValue, rowIdField));
    Integer currentBucket = null;

    if (operation == DELETE_OPERATION || operation == UPDATE_OPERATION) {
      /**
       * make sure bucketProperty in the delete event is from the {@link row} rather than whatever
       * {@link this#bucket} is.  For bucketed tables, the 2 must agree on bucketId encoded in it
       * not for necessarily the whole value.  For unbucketed tables there is no relationship.
       */
      currentBucket = setBucket(bucketInspector.get(
        recIdInspector.getStructFieldData(rowValue, bucketField)), operation);
      // Initialize a deleteEventWriter if not yet done. (Lazy initialization)
      if (deleteEventWriter == null) {
        // Initialize an indexBuilder for deleteEvents. (HIVE-17284)
        deleteEventIndexBuilder = new KeyIndexBuilder();
        this.deleteEventWriter = OrcFile.createWriter(deleteEventPath,
            deleteWriterOptions.callback(deleteEventIndexBuilder));
        AcidUtils.OrcAcidVersion.setAcidVersionInDataFile(deleteEventWriter);
        if (options.isWriteVersionFile()) {
          AcidUtils.OrcAcidVersion.writeVersionFile(this.deleteEventPath.getParent(), fs);
        }
      }

      // A delete/update generates a delete event for the original row.
      this.rowId.set(rowId);
      this.originalWriteId.set(originalWriteId);
      item.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(DELETE_OPERATION));
      item.setFieldValue(OrcRecordUpdater.ROW, null); // ROW is null for delete events.
      deleteEventIndexBuilder.addKey(DELETE_OPERATION, originalWriteId, bucket.get(), rowId);
      deleteEventWriter.addRow(item);
      restoreBucket(currentBucket, operation);
    }

    if (operation == UPDATE_OPERATION) {
      // A new row is also inserted in the usual delta file for an update event.
      addSimpleEvent(INSERT_OPERATION, currentWriteId, insertedRows++, row);
    }
  }
The INSERT event always uses {@link #bucket} that this {@link RecordUpdater} was created with
thus even for unbucketed tables, the N in bucket_N file name matches writerId/bucketId even for
late split
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRecordUpdater.java