@Test
  public void testAbort() throws Exception {
    boolean isVectorized = false;
    runStatementOnDriver("drop table if exists T");
    runStatementOnDriver("drop table if exists Tstage");
    runStatementOnDriver("create table T (a int, b int) stored as orc tblproperties('transactional'='true')");
    //Tstage is just a simple way to generate test data
    runStatementOnDriver("create table Tstage (a int, b int) stored as orc tblproperties('transactional'='false')");
    runStatementOnDriver("insert into Tstage values(5,5),(6,6)");
    //this creates an ORC data file with correct schema under table root
    runStatementOnDriver("export table Tstage to '" + getWarehouseDir() + "/1'");
    //and do a Load Data into the same table, which should now land in a delta_x_x.
    // 'data' is created by export command/
    runStatementOnDriver("insert into T values(1,2),(3,4)");
    runStatementOnDriver("START TRANSACTION");
    runStatementOnDriver("load data local inpath '" + getWarehouseDir() + "/1/data' into table T");
    runStatementOnDriver("ROLLBACK");

    String testQuery = isVectorized ? "select ROW__ID, a, b from T order by ROW__ID" :
      "select ROW__ID, a, b, INPUT__FILE__NAME from T order by ROW__ID";
    String[][] expected = new String[][] {
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2", "t/delta_0000001_0000001_0000/bucket_00000_0"},
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4", "t/delta_0000001_0000001_0000/bucket_00000_0"}
    };
    checkResult(expected, testQuery, "load data inpath");
  }
Make sure Load Data assigns ROW_IDs correctly when there is statementId suffix on delta dir
For example, delta_x_x_0001.
ql/src/test/org/apache/hadoop/hive/ql/TestTxnLoadData.java