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

dynamic partition insert project wrong column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1.0
    • None
    • SQL
    • None
    • hive 1.1.0-cdh5.4.8

    Description

      We have two table as below:
      create table test (
      id bigint comment ' id',
      )
      PARTITIONED BY(etl_dt string)
      STORED AS ORC;

      create table test1 (
      id bigint
      start_time int,
      )
      PARTITIONED BY(etl_dt string)
      STORED AS ORC;

      we use sql like below to import rows from test1 to test:

      insert overwrite table test PARTITION(etl_dt)
      select id
      ,from_unixtime(start_time,'yyyy-MM-dd') as etl_dt
      from test1
      where test1.etl_dt='2016-01-12';

      but it behave wrong, it use test1.etl_dt as the test's partition value, not the 'etl_dt' in select.
      We think it's a bug, anyone to fix it?

      Attachments

        Activity

          People

            gates Alan Gates
            gogototo bin wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: