[
https://issues.apache.org/jira/browse/HIVE-23031?focusedWorklogId=429055&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-429055
]
ASF GitHub Bot logged work on HIVE-23031:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Apr/20 14:39
Start Date: 30/Apr/20 14:39
Worklog Time Spent: 10m
Work Description: kgyrtkirk commented on a change in pull request #988:
URL: https://github.com/apache/hive/pull/988#discussion_r418060431
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -2465,6 +2465,19 @@ private static void
populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
"If the number of references to a CTE clause exceeds this threshold,
Hive will materialize it\n" +
"before executing the main query block. -1 will disable this
feature."),
+ HIVE_OPTIMIZE_BI_ENABLED("hive.optimize.bi.enabled", false,
+ "Enables query rewrites based on approximate functions(sketches)."),
+
+
HIVE_OPTIMIZE_BI_REWRITE_COUNTDISTINCT_ENABLED("hive.optimize.bi.rewrite.countdistinct.enabled",
+ true,
+ "Enables to rewrite COUNT(DISTINCT(X)) queries to be rewritten to use
sketch functions."),
+
+ HIVE_OPTIMIZE_BI_REWRITE_COUNT_DISTINCT_SKETCH(
+ "hive.optimize.bi.rewrite.countdistinct.sketch", "hll",
+ new StringSet("hll", "cpc", "theta"),
Review comment:
I don't think that would be neccessary
* it works correctly - even if we have 1 algo the interesting behaviour is
still there - which is: if the rewrite is enabled the created MV will be a
rewritten one
* it won't get applied for different modes/etc so it doesn't lead to errors
at all...
I've added a test(sketches_materialized_view_sketchtype.q)
which shows how it works when there is an MV for HLL ; in case the mode is
not HLL the MV is ignored and computed directly
I think the real meaning of the MV should not change(I think we agree on
this); we have 2 choices here:
* ignore all rewriting during MV construction/rebuild - so this rewrite may
not happen for an MV - and users have to use the expanded form of the sketch
stuff to create an MV for that purpose
* save a conf overlay alongside with the MV
I think addressing this is outside of the scope of this change
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 429055)
Time Spent: 2h 50m (was: 2h 40m)
> Add option to enable transparent rewrite of count(distinct) into sketch
> functions
> ---------------------------------------------------------------------------------
>
> Key: HIVE-23031
> URL: https://issues.apache.org/jira/browse/HIVE-23031
> Project: Hive
> Issue Type: Sub-task
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
> Attachments: HIVE-23031.01.patch, HIVE-23031.02.patch,
> HIVE-23031.03.patch, HIVE-23031.03.patch, HIVE-23031.03.patch,
> HIVE-23031.04.patch, HIVE-23031.04.patch
>
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)