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

MetastoreDirectSql fails for zero item queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.0.0
    • None
    • Metastore
    • None

    Description

      Metastore Direct SQL throws a SQL Exception

      2015-02-21 00:29:00,238 WARN  [pool-3-thread-10]: metastore.ObjectStore (ObjectStore.java:handleDirectSqlError(2400)) - Direct SQL failed
      MetaException(message:See previous errors; Error executing SQL query "select count("COLUMN_NAME") from "PART_COL_STATS" where "DB_NAME" = ? and "TABLE_NAME" = ?  and "COLUMN_NAME" in () and "PARTITION_NAME" in () group by "PARTITION_NAME"
      ".)
              at org.apache.hadoop.hive.metastore.MetaStoreDirectSql.executeWithArray(MetaStoreDirectSql.java:1448)
              at org.apache.hadoop.hive.metastore.MetaStoreDirectSql.partsFoundForPartitions(MetaStoreDirectSql.java:1098)
              at org.apache.hadoop.hive.metastore.MetaStoreDirectSql.aggrColStatsForPartitions(MetaStoreDirectSql.java:1081)
              at org.apache.hadoop.hive.metastore.ObjectStore$8.getSqlResult(ObjectStore.java:6100)
              at org.apache.hadoop.hive.metastore.ObjectStore$8.getSqlResult(ObjectStore.java:6096)
              at org.apache.hadoop.hive.metastore.ObjectStore$GetHelper.run(ObjectStore.java:2365)
              at org.apache.hadoop.hive.metastore.ObjectStore.get_aggr_stats_for(ObjectStore.java:6115)
      

      The query to trigger the issue an EXPLAIN query with column + partition stats on.

       explain select count(1) from store_sales where '2014-10-01' =ss_sold_date ;
      

      Attachments

        Issue Links

          Activity

            People

              sershe Sergey Shelukhin
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: