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

CTLV with user specified location is not honoured

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.1, 4.0.0
    • None
    • None
    • None

    Description

      Steps to repro :

       

      CREATE TABLE emp_table (id int, name string, salary int);
      insert into emp_table values(1,'aaaaa',20000);
      CREATE VIEW emp_view AS SELECT * FROM emp_table WHERE salary>10000;
      CREATE EXTERNAL TABLE emp_ext_table like emp_view LOCATION '/tmp/emp_ext_table';
      show create table emp_ext_table;

       

      +----------------------------------------------------+
      | createtab_stmt |
      +----------------------------------------------------+
      | CREATE EXTERNAL TABLE `emp_ext_table`( |
      | `id` int, |
      | `name` string, |
      | `salary` int) |
      | ROW FORMAT SERDE |
      | 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' |
      | STORED AS INPUTFORMAT |
      | 'org.apache.hadoop.mapred.TextInputFormat' |
      | OUTPUTFORMAT |
      | 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' |
      | LOCATION |
      | 'hdfs://nn:8020/warehouse/tablespace/external/hive/emp_ext_table' |
      | TBLPROPERTIES ( |
      | 'bucketing_version'='2', |
      | 'transient_lastDdlTime'='1563467962') |
      +----------------------------------------------------+

      Table Location is not '/tmp/emp_ext_table', instead location is set to default warehouse path.

       

       

      Attachments

        1. HIVE-22009.1.patch
          8 kB
          Naresh P R
        2. HIVE-22009.1-branch-3.1.patch
          3 kB
          Naresh P R
        3. HIVE-22009.2.patch
          3 kB
          Naresh P R
        4. HIVE-22009.3.patch
          4 kB
          Naresh P R
        5. HIVE-22009.patch
          8 kB
          Naresh P R
        6. HIVE-22009-branch-3.1.patch
          8 kB
          Naresh P R

        Activity

          People

            nareshpr Naresh P R
            nareshpr Naresh P R
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: