Hive
  1. Hive
  2. HIVE-3610

Add a command "Explain dependency ..."

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: Query Processor
    • Labels:
      None
    • Release Note:
      Hide
      This introduces a new command

      EXPLAIN DEPENDENCY <query>

      which outputs a JSON object containing the input tables and partitions the query will access without actually running the query.
      Show
      This introduces a new command EXPLAIN DEPENDENCY <query> which outputs a JSON object containing the input tables and partitions the query will access without actually running the query.

      Description

      Add a new command "EXPLAIN DEPENDENCY".
      Any query can be passed to EXPLAIN DEPENDENCY as with EXPLAIN (FORMATTED/EXTENDED). The output of this command will be JSON that provides the list of tables and partitions that the query depends on.

      One possible use case is to determine the set of tables/views that are used by a view, and the set of partitions that are used by a given query on that view. This will allow a view to be replicated from one Hive instance to another, since we can determine the set of objects that need to be replicated for replication of the view to be successful.

      Example output:
      {"input_tables":[

      {"tablename": "default@test_sambavi_v2", "tabletype": "EXTERNAL_TABLE"}

      ,

      {"tablename": "default@test_sambavi_v1", "tabletype": "TABLE"}

      ], "input partitions":["default@srcpart@ds=2008-04-08/hr=11","default@srcpart@ds=2008-04-08/hr=12"]}

      1. explain_dependency.2.patch
        15 kB
        Sambavi Muthukrishnan
      2. explain_dependency.1.patch
        15 kB
        Sambavi Muthukrishnan

        Activity

        Ashutosh Chauhan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kevin Wilfong made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Release Note This introduces a new command

        EXPLAIN DEPENDENCY <query>

        which outputs a JSON object containing the input tables and partitions the query will access without actually running the query.
        Fix Version/s 0.10.0 [ 12320745 ]
        Resolution Fixed [ 1 ]
        Sambavi Muthukrishnan made changes -
        Attachment explain_dependency.2.patch [ 12551046 ]
        Sambavi Muthukrishnan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Sambavi Muthukrishnan made changes -
        Field Original Value New Value
        Attachment explain_dependency.1.patch [ 12550556 ]
        Sambavi Muthukrishnan created issue -

          People

          • Assignee:
            Sambavi Muthukrishnan
            Reporter:
            Sambavi Muthukrishnan
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development