case classOptimizeMetadataOnlyQuery(catalog: SessionCatalog, conf: SQLConf) extends Rule[LogicalPlan] with Product with Serializable
This rule optimizes the execution of queries that can be answered by looking only at
partition-level metadata. This applies when all the columns scanned are partition columns, and
the query has an aggregate operator that satisfies the following conditions:
1. aggregate expression is partition columns.
e.g. SELECT col FROM tbl GROUP BY col.
2. aggregate function on partition columns with DISTINCT.
e.g. SELECT col1, count(DISTINCT col2) FROM tbl GROUP BY col1.
3. aggregate function on partition columns which have same result w or w/o DISTINCT keyword.
e.g. SELECT col1, Max(col2) FROM tbl GROUP BY col1.
Linear Supertypes
Serializable, Serializable, Product, Equals, Rule[LogicalPlan], Logging, AnyRef, Any
A pattern that finds the partitioned table relation node inside the given plan, and returns a
pair of the partition attributes and the table relation node.
This rule optimizes the execution of queries that can be answered by looking only at partition-level metadata. This applies when all the columns scanned are partition columns, and the query has an aggregate operator that satisfies the following conditions: 1. aggregate expression is partition columns. e.g. SELECT col FROM tbl GROUP BY col. 2. aggregate function on partition columns with DISTINCT. e.g. SELECT col1, count(DISTINCT col2) FROM tbl GROUP BY col1. 3. aggregate function on partition columns which have same result w or w/o DISTINCT keyword. e.g. SELECT col1, Max(col2) FROM tbl GROUP BY col1.