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

Implement Query Text based MaterializedView rewrite

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Besides the way queries are currently rewritten to use materialized views in Hive this project provides an alternative:
      Compare the query text with the materialized views query text stored. If we found a match the original query's logical plan can be replaced by a scan on the materialized view.

      • Only materialized views which are enabled to rewrite can participate
      • Use existing HiveMaterializedViewsRegistry through Hive object by adding a lookup method by query text.
      • There might be more than one materialized views which have the same query text. In this case chose the first valid one.
      • Validation can be done by calling Hive.validateMaterializedViewsFromRegistry()
      • The scope of this first patch is rewriting queries which entire text can be matched only.
      • Use the expanded query text (fully qualified column and table names) for comparing

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 10m
                  4h 10m