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

can't do query on partitioned view with analytic function in strictmode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.13.0, 0.14.0, 1.0.0
    • None
    • Hive, Views
    • None
    • Cloudera 5.3.x.

    • view,partition,analytical function

    Description

      Hey Guys,

      I created the following table:

      CREATE TABLE t1 (id int, key string, value string) partitioned by (dt int);

      And after that i created a view on that table as follow:

      create view v1 PARTITIONED ON (dt)
      as
      SELECT * FROM (
      SELECT row_number() over (partition by key order by value asc) as row_n, * FROM t1
      ) t WHERE row_n = 1;

      We are working with hive.mapred.mode=strict and when I try to do the query select * from v1 where dt = 2 , I'm getting the following error:

      FAILED: SemanticException [Error 10041]: No partition predicate found for Alias "v1:t:t1" Table "t1"

      Is this a bug or a limitation of Hive when you use analytic functions in partitioned views? If i remove the row_number function it works without problems.

      Thanks in advance, any help will be appreciated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hlagos Hector Lagos
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: