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

Simple select query finds nothing when non-native table has partition columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Query Processor
    • None
    • CDH 5.5.5 on RHEL 6.8

    Description

      First, some background info: A non-native table can be created with partition columns defined. However, the existence of partition columns for a non-native table is problematic. Nothing disallows the table creation, and the documentation [1] does not mention that non-native tables cannot have partition columns. In fact, it suggests that "PARTITIONED BY" can be specified.

      With this table definition, when running a query that does not launch a MR job, the query completes successfully and immediately, but no rows are ever returned. I have not yet been able to identify the specific code logic path that prevents it from working as expected, perhaps something in the query plan related to partition pruning.

      This bug is similar to HIVE-18086. We see this issue with a query like "select * from my_table;" and the HIVE-18086 NullPointerException with a query like "select count(*) from my_table;".

      We encountered this bug using the HBaseStorageHandler. However, enabling debug logging suggests that the query is being short-circuited without actually connecting to HBase at all.

      [1] https://cwiki.apache.org/confluence/display/Hive/StorageHandlers#StorageHandlers-DDL

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              noslowerdna Andrew Olson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: