hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (HIVE-23030) Enable sketch union-s to be rolled up
Date Wed, 25 Mar 2020 01:14:01 GMT


ASF GitHub Bot logged work on HIVE-23030:

                Author: ASF GitHub Bot
            Created on: 25/Mar/20 01:13
            Start Date: 25/Mar/20 01:13
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #960: HIVE-23030 ds rollup union

 File path: ql/src/test/queries/clientpositive/sketches_rollup.q
 @@ -0,0 +1,40 @@
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.strict.checks.cartesian.product=false;
+set hive.stats.fetch.column.stats=true;
+set hive.materializedview.rewriting=true;
+set hive.fetch.task.conversion=none;
+create table sketch_input (id int, category char(1))
+TBLPROPERTIES ('transactional'='true');
+insert into table sketch_input values
+  (1,'a'),(1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'), (6, 'a'), (7, 'a'), (8, 'a'),
(9, 'a'), (10, 'a'),
+  (6,'b'),(6, 'b'), (7, 'b'), (8, 'b'), (9, 'b'), (10, 'b'), (11, 'b'), (12, 'b'), (13, 'b'),
(14, 'b'), (15, 'b')
+-- create an mv for the intermediate results
+create  materialized view mv_1 as
+  select category, ds_hll_sketch(id),count(id) from sketch_input group by category;
+-- see if we use the mv
+select category, ds_hll_estimate(ds_hll_sketch(id)) from sketch_input group by category;
+select category, ds_hll_estimate(ds_hll_sketch(id)) from sketch_input group by category;
 Review comment:
   Checking the results below, it seems we will need to add a cast or round when we do the
automatic mapping of count distinct to hll. Can we add any of these functions to make sure
it is working as expected, i.e., rewriting still being triggered?
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 409263)
    Time Spent: 40m  (was: 0.5h)

> Enable sketch union-s to be rolled up
> -------------------------------------
>                 Key: HIVE-23030
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-23030.01.patch, HIVE-23030.02.patch
>          Time Spent: 40m
>  Remaining Estimate: 0h
> Enabling rolling up sketch aggregates could enable the matching of materialized views
created for higher dimensions to be applied for lower dimension cases.

This message was sent by Atlassian Jira

View raw message