Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18735

Create table like loses transactional attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 4.0.0-alpha-1
    • Transactions
    • None

    Description

      create table T1(a int, b int) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')";
      
      create table T like T1;
      
      show create table T ;
      
      CREATE TABLE `T`(
        `a` int,
        `b` int)
      CLUSTERED BY (
        a)
      INTO 2 BUCKETS
      ROW FORMAT SERDE
        'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
      STORED AS INPUTFORMAT
        'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
      OUTPUTFORMAT
        'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
      LOCATION
       'file:/Users/ekoifman/IdeaProjects/hive/ql/target/tmp/org.apache.hadoop.hive.ql.TestTxnCommands-1518813536099/warehouse/t'
      TBLPROPERTIES (
        'transient_lastDdlTime'='1518813564')
      

      Specifying props explicitly does work 

      create table T1(a int, b int) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')";
      create table T like T1 TBLPROPERTIES ('transactional'='true');
      show create table T ;
      CREATE TABLE `T`(
        `a` int,
        `b` int)
      CLUSTERED BY (
        a)
      INTO 2 BUCKETS
      ROW FORMAT SERDE
        'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
      STORED AS INPUTFORMAT
        'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
      OUTPUTFORMAT
        'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
      LOCATION
        'file:/Users/ekoifman/IdeaProjects/hive/ql/target/tmp/org.apache.hadoop.hive.ql.TestTxnCommands-1518814098564/warehouse/t'
      TBLPROPERTIES (
        'transactional'='true',
        'transactional_properties'='default',
        'transient_lastDdlTime'='1518814111')
      

      Attachments

        1. HIVE-18735.01.patch
          3 kB
          László Pintér
        2. HIVE-18735.02.patch
          3 kB
          László Pintér
        3. HIVE-18735.03.patch
          62 kB
          László Pintér
        4. HIVE-18735.04.patch
          63 kB
          László Pintér
        5. HIVE-18735.05.patch
          63 kB
          László Pintér
        6. HIVE-18735.06.patch
          63 kB
          László Pintér

        Issue Links

          Activity

            People

              lpinter László Pintér
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: