Skip to content

Commit 6fd8443

Browse files
Cut down size estimation related stuff.
1 parent a4267be commit 6fd8443

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,3 @@ abstract class UnaryNode extends LogicalPlan with trees.UnaryNode[LogicalPlan] {
109109
abstract class BinaryNode extends LogicalPlan with trees.BinaryNode[LogicalPlan] {
110110
self: Product =>
111111
}
112-
113-
/**
114-
* A trait that can be mixed in by logical operators representing relations that could
115-
* estimate their physical sizes.
116-
* @tparam Ctx input (context) to the size estimator
117-
*/
118-
trait SizeEstimatableRelation[Ctx] { self: LogicalPlan =>
119-
def estimatedSize(context: Ctx): Long
120-
}

sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetRelation.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ import parquet.schema.MessageType
2929

3030
import org.apache.spark.sql.SQLContext
3131
import org.apache.spark.sql.catalyst.analysis.{MultiInstanceRelation, UnresolvedException}
32-
import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference, Row}
33-
import org.apache.spark.sql.catalyst.plans.logical.{SizeEstimatableRelation, LogicalPlan, LeafNode}
34-
import org.apache.spark.sql.catalyst.types._
32+
import org.apache.spark.sql.catalyst.expressions.Attribute
33+
import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, LeafNode}
3534

3635
// Implicits
3736
import scala.collection.JavaConversions._
@@ -52,8 +51,7 @@ private[sql] case class ParquetRelation(
5251
path: String,
5352
@transient conf: Option[Configuration] = None)
5453
extends LeafNode
55-
with MultiInstanceRelation
56-
with SizeEstimatableRelation[SQLContext] {
54+
with MultiInstanceRelation {
5755

5856
self: Product =>
5957

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ object HiveMetastoreTypes extends RegexParsers {
247247
private[hive] case class MetastoreRelation
248248
(databaseName: String, tableName: String, alias: Option[String])
249249
(val table: TTable, val partitions: Seq[TPartition])
250-
extends BaseRelation
251-
with SizeEstimatableRelation[HiveContext] {
250+
extends BaseRelation {
252251
// TODO: Can we use org.apache.hadoop.hive.ql.metadata.Table as the type of table and
253252
// use org.apache.hadoop.hive.ql.metadata.Partition as the type of elements of partitions.
254253
// Right now, using org.apache.hadoop.hive.ql.metadata.Table and

0 commit comments

Comments
 (0)