org.apache.hadoop.hive.ql.optimizer.physical
Class MetadataOnlyOptimizer
java.lang.Object
org.apache.hadoop.hive.ql.optimizer.physical.MetadataOnlyOptimizer
- All Implemented Interfaces:
- PhysicalPlanResolver
public class MetadataOnlyOptimizer
- extends Object
- implements PhysicalPlanResolver
MetadataOnlyOptimizer determines to which TableScanOperators "metadata only"
optimization can be applied. Such operator must use only partition columns
(it is easy to check, because we are after column pruning and all places
where the data from the operator is used must go through GroupByOperator
distinct or distinct-like aggregations. Aggregation is distinct-like if
adding distinct wouldn't change the result, for example min, max.
We cannot apply the optimization without group by, because the results depend
on the numbers of rows in partitions, for example count(hr) will count all
rows in matching partitions.
MetadataOnlyOptimizer
public MetadataOnlyOptimizer()
resolve
public PhysicalContext resolve(PhysicalContext pctx)
throws SemanticException
- Description copied from interface:
PhysicalPlanResolver
- All physical plan resolvers have to implement this entry method.
- Specified by:
resolve
in interface PhysicalPlanResolver
- Returns:
- the physical plan
- Throws:
SemanticException
Copyright © 2014 The Apache Software Foundation. All rights reserved.