hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-21857) Sort conditions in a filter predicate to accelerate query processing
Date Fri, 21 Jun 2019 00:20:01 GMT

     [ https://issues.apache.org/jira/browse/HIVE-21857?focusedWorklogId=264257&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-264257
]

ASF GitHub Bot logged work on HIVE-21857:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jun/19 00:19
            Start Date: 21/Jun/19 00:19
    Worklog Time Spent: 10m 
      Work Description: vineetgarg02 commented on pull request #671: HIVE-21857
URL: https://github.com/apache/hive/pull/671#discussion_r296057847
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/HiveRelMdDistinctRowCount.java
 ##########
 @@ -61,17 +62,11 @@ private HiveRelMdDistinctRowCount() {
   @Override
   public Double getDistinctRowCount(RelNode rel, RelMetadataQuery mq, ImmutableBitSet groupKey,
       RexNode predicate) {
-    if (rel instanceof HiveTableScan) {
-      return getDistinctRowCount((HiveTableScan) rel, mq, groupKey, predicate);
-    }
-    /*
-     * For now use Calcite' default formulas for propagating NDVs up the Query
-     * Tree.
-     */
-    return super.getDistinctRowCount(rel, mq, groupKey, predicate);
+    return NumberUtil.multiply(mq.getRowCount(rel),
 
 Review comment:
   We don't take groupKey into consideration anymore? What is the reason behind 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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 264257)

> Sort conditions in a filter predicate to accelerate query processing
> --------------------------------------------------------------------
>
>                 Key: HIVE-21857
>                 URL: https://issues.apache.org/jira/browse/HIVE-21857
>             Project: Hive
>          Issue Type: New Feature
>          Components: CBO
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-21857.01.patch, HIVE-21857.02.patch, HIVE-21857.03.patch, HIVE-21857.04.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Following approach similar to http://db.cs.berkeley.edu/jmh/miscpapers/sigmod93.pdf .
> To reorder predicates in AND conditions, we could rank each of elements in the clauses
in increasing order based on following formula:
> {code}
> rank = (selectivity - 1) / cost per tuple
> {code}
> Similarly, for OR conditions:
> {code}
> rank = (-selectivity) / cost per tuple
> {code}
> Selectivity can be computed with FilterSelectivityEstimator. For cost per tuple, we will
need to come up with some heuristic based on how expensive is the evaluation of the functions
contained in that predicate. Custom UDFs could be annotated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message