You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2019/06/10 23:21:00 UTC
[jira] [Created] (HIVE-21857) Sort conditions in a filter predicate
to accelerate query processing
Jesus Camacho Rodriguez created HIVE-21857:
----------------------------------------------
Summary: 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: Bug
Components: CBO
Reporter: Jesus Camacho Rodriguez
Assignee: Jesus Camacho Rodriguez
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)