private void testImport(boolean existingTarget) throws Exception {
    dropTables("T", "Tstage");
    if(existingTarget) {
      runStatementOnDriver("create table T (a int, b int) stored as orc");
    }
    //Tstage is just a simple way to generate test data
    runStatementOnDriver("create table Tstage (a int, b int) stored as orc " +
        "tblproperties('transactional'='true')");
    //this creates an ORC data file with correct schema under table root
    runStatementOnDriver("insert into Tstage values(1,2),(3,4),(5,6)");
    runStatementOnDriver("export table Tstage to '" + getWarehouseDir() + "/1'");
    //runStatementOnDriver("truncate table Tstage");

    //load into existing empty table T
    runStatementOnDriver("import table T from '" + getWarehouseDir() + "/1'");

    String testQuery = "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/000000_0"},
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4",
            "t/delta_0000001_0000001_0000/000000_0"},
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":2}\t5\t6",
            "t/delta_0000001_0000001_0000/000000_0"}};
    checkResultAndVectorization(expected, testQuery, "import existing table", LOG);

    runStatementOnDriver("update T set a = 0 where b = 6");
    String[][] expected2 = new String[][] {
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2",
            "t/delta_0000001_0000001_0000/000000_0"},
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4",
            "t/delta_0000001_0000001_0000/000000_0"},
        {"{\"writeid\":2,\"bucketid\":536870913,\"rowid\":0}\t0\t6",
            "t/delta_0000002_0000002_0001/bucket_00000_0"}};
    checkResultAndVectorization(expected2, testQuery, "update imported table", LOG);

    runStatementOnDriver("alter table T compact 'minor'");
    TestTxnCommands2.runWorker(hiveConf);
    String[][] expected3 = new String[][] {
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2",
            ".*t/delta_0000001_0000002_v000001[4-5]/bucket_00000"},
        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t3\t4",
            ".*t/delta_0000001_0000002_v000001[4-5]/bucket_00000"},
        {"{\"writeid\":2,\"bucketid\":536870913,\"rowid\":0}\t0\t6",
            ".*t/delta_0000001_0000002_v000001[4-5]/bucket_00000"}};
    checkResultAndVectorization(expected3, testQuery, "minor compact imported table", LOG);

  }
MM tables already work - mm_exim.q
Export creates a bunch of metadata in addition to data including all table props/IF/OF etc
Import from 'export' can create a table (any name specified) or add data into existing table.
If importing into existing table (un-partitioned) it must be empty.
If Import is creating a table it will be exactly like exported one except for the name.
ql/src/test/org/apache/hadoop/hive/ql/TestTxnExIm.java