Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22253 General task tracking improvements for materialized views
  3. HIVE-22265

Ordinals in view are not being picked up in materialized view

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: CBO, Materialized views
    • Labels:
      None

      Description

      There is a conf which allows ordinals to be used for group by, i.e. 

      hive.groupby.position.alias

      This isn't being picked up by materialized views when set in a view.  Workaround is to not use ordinals.  Script is attached.

      Example:

      create view campaigns.campaign_data_lview_bad as SELECT platform, platform_version, currency, sum(amount) as sum_amount, sum(duration) as sum_duration, count(user_    id) count_user_id, min(amount) min_amount, max(amount) max_amount, year , month FROM `campaigns`.`campaign_data` GROUP BY 1, 2, 3, 9, 10;

      create materialized view aview620_bad  stored as orc as select platform, platform_version, currency, sum_amount, sum_duration, count_user_id, min_amount, max_amoun    t, year, month from `campaigns`.`campaign_data_lview_bad`;

        Attachments

        1. lv-exp-unalias.sql
          2 kB
          Steve Carlin

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              scarlin Steve Carlin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: