Hive
  1. Hive
  2. HIVE-1072

"show table extended like table partition(xxx) " will show the result of the whole table if the partition does not exist

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.1
    • Fix Version/s: 0.5.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      HIVE-1072. Show table extended to error out when the partition does not exist. (Yongqiang He via zshao)
      Show
      HIVE-1072 . Show table extended to error out when the partition does not exist. (Yongqiang He via zshao)

      Description

      See the following example, we should output an error for the second command.

      hive> show table extended like member_count;
      OK
      tableName:member_count
      owner:null
      location:/user/hive/member_count
      inputformat:org.apache.hadoop.mapred.SequenceFileInputFormat
      outputformat:org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
      columns:struct columns { string count}
      partitioned:true
      partitionColumns:struct partition_columns { string ds}
      totalNumberFiles:233933
      totalFileSize:32802665
      maxFileSize:257
      minFileSize:140
      lastAccessTime:1264017438860
      lastUpdateTime:1263949909703
      
      Time taken: 125.104 seconds
      
      hive> show table extended like member_count partition(ds = '2009-10-11');
      OK
      tableName:member_count
      owner:null
      location:/user/hive/member_count
      inputformat:org.apache.hadoop.mapred.SequenceFileInputFormat
      outputformat:org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
      columns:struct columns { string count}
      partitioned:true
      partitionColumns:struct partition_columns { string ds}
      totalNumberFiles:233933
      totalFileSize:32802665
      maxFileSize:257
      minFileSize:140
      lastAccessTime:1264017438860
      lastUpdateTime:1263949909703
      
      Time taken: 24.618 seconds
      
      hive> show table extended like member_count partition(ds = '2009-12-11');
      OK
      tableName:member_count
      owner:null
      location:/user/hive/member_count
      inputformat:org.apache.hadoop.mapred.SequenceFileInputFormat
      outputformat:org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
      columns:struct columns { string count}
      partitioned:true
      partitionColumns:struct partition_columns { string ds}
      totalNumberFiles:3495
      totalFileSize:489417
      maxFileSize:257
      minFileSize:140
      lastAccessTime:1262676533852
      lastUpdateTime:1263949909703
      
      Time taken: 0.549 seconds
      
      1. hive-1072.2.patch
        2 kB
        He Yongqiang
      2. hive-1072.patch
        7 kB
        He Yongqiang

        Activity

        Zheng Shao created issue -
        He Yongqiang made changes -
        Field Original Value New Value
        Attachment hive-1072.patch [ 12430942 ]
        He Yongqiang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Zheng Shao added a comment -

        If the partition does not exist, we should fail the query.
        Can you add a negative test instead?

        Show
        Zheng Shao added a comment - If the partition does not exist, we should fail the query. Can you add a negative test instead?
        Hide
        He Yongqiang added a comment -

        np. i can add that. But it seems many other commands just output error msg and succeed, like 'describe'.

        Show
        He Yongqiang added a comment - np. i can add that. But it seems many other commands just output error msg and succeed, like 'describe'.
        Hide
        He Yongqiang added a comment -

        hive-1072.2.patch fails query when the given partition does not exist.

        Show
        He Yongqiang added a comment - hive-1072.2.patch fails query when the given partition does not exist.
        He Yongqiang made changes -
        Attachment hive-1072.2.patch [ 12430951 ]
        Hide
        Zheng Shao added a comment -

        +1. Will commit after test.

        Show
        Zheng Shao added a comment - +1. Will commit after test.
        Hide
        Zheng Shao added a comment -

        Committed. Thanks Yongqiang.

        Show
        Zheng Shao added a comment - Committed. Thanks Yongqiang.
        Zheng Shao made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Release Note HIVE-1072. Show table extended to error out when the partition does not exist. (Yongqiang He via zshao)
        Fix Version/s 0.6.0 [ 12314524 ]
        Resolution Fixed [ 1 ]
        Hide
        Ning Zhang added a comment -

        Zheng and Yongqiang, one test result file was missing for the committed version to branch 0.5.0: ql/src/test/results/clientnegative/invalide_t_alter1.q.out. Can you double check and commit it?

        Show
        Ning Zhang added a comment - Zheng and Yongqiang, one test result file was missing for the committed version to branch 0.5.0: ql/src/test/results/clientnegative/invalide_t_alter1.q.out. Can you double check and commit it?
        Hide
        Zheng Shao added a comment -

        Ning, sorry about that. I just committed it to branch-0.5 under HIVE-1059.

        Show
        Zheng Shao added a comment - Ning, sorry about that. I just committed it to branch-0.5 under HIVE-1059 .
        Carl Steinbach made changes -
        Fix Version/s 0.5.0 [ 12314156 ]
        Fix Version/s 0.6.0 [ 12314524 ]
        Affects Version/s 0.4.1 [ 12314225 ]
        Component/s Query Processor [ 12312586 ]
        Carl Steinbach made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1h 2m 1 He Yongqiang 20/Jan/10 23:20
        Patch Available Patch Available Resolved Resolved
        2d 2h 51m 1 Zheng Shao 23/Jan/10 02:12
        Resolved Resolved Closed Closed
        692d 21h 53m 1 Carl Steinbach 17/Dec/11 00:06

          People

          • Assignee:
            He Yongqiang
            Reporter:
            Zheng Shao
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development