Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6356#discussion_r38986171
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -781,77 +787,11 @@ class SQLContext(@transient val sparkContext: 
SparkContext)
         }.toArray
       }
     
    -  protected[sql] class SparkPlanner extends SparkStrategies {
    -    val sparkContext: SparkContext = self.sparkContext
    -
    -    val sqlContext: SQLContext = self
    -
    -    def codegenEnabled: Boolean = self.conf.codegenEnabled
    -
    -    def unsafeEnabled: Boolean = self.conf.unsafeEnabled
    -
    -    def numPartitions: Int = self.conf.numShufflePartitions
    -
    -    def strategies: Seq[Strategy] =
    -      experimental.extraStrategies ++ (
    -      DataSourceStrategy ::
    -      DDLStrategy ::
    -      TakeOrderedAndProject ::
    -      HashAggregation ::
    -      Aggregation ::
    -      LeftSemiJoin ::
    -      EquiJoinSelection ::
    -      InMemoryScans ::
    -      BasicOperators ::
    -      CartesianProduct ::
    -      BroadcastNestedLoopJoin :: Nil)
    -
    -    /**
    -     * Used to build table scan operators where complex projection and 
filtering are done using
    -     * separate physical operators.  This function returns the given scan 
operator with Project and
    -     * Filter nodes added only when needed.  For example, a Project 
operator is only used when the
    -     * final desired output requires complex expressions to be evaluated 
or when columns can be
    -     * further eliminated out after filtering has been done.
    -     *
    -     * The `prunePushedDownFilters` parameter is used to remove those 
filters that can be optimized
    -     * away by the filter pushdown optimization.
    -     *
    -     * The required attributes for both filtering and expression 
evaluation are passed to the
    -     * provided `scanBuilder` function so that it can avoid unnecessary 
column materialization.
    -     */
    -    def pruneFilterProject(
    -        projectList: Seq[NamedExpression],
    -        filterPredicates: Seq[Expression],
    -        prunePushedDownFilters: Seq[Expression] => Seq[Expression],
    -        scanBuilder: Seq[Attribute] => SparkPlan): SparkPlan = {
    -
    -      val projectSet = AttributeSet(projectList.flatMap(_.references))
    -      val filterSet = AttributeSet(filterPredicates.flatMap(_.references))
    -      val filterCondition =
    -        
prunePushedDownFilters(filterPredicates).reduceLeftOption(catalyst.expressions.And)
    -
    -      // Right now we still use a projection even if the only evaluation 
is applying an alias
    -      // to a column.  Since this is a no-op, it could be avoided. 
However, using this
    -      // optimization with the current implementation would change the 
output schema.
    -      // TODO: Decouple final output schema from expression evaluation so 
this copy can be
    -      // avoided safely.
    -
    -      if (AttributeSet(projectList.map(_.toAttribute)) == projectSet &&
    -          filterSet.subsetOf(projectSet)) {
    -        // When it is possible to just use column pruning to get the right 
projection and
    -        // when the columns of this projection are enough to evaluate all 
filter conditions,
    -        // just do a scan followed by a filter, with no extra project.
    -        val scan = scanBuilder(projectList.asInstanceOf[Seq[Attribute]])
    -        filterCondition.map(Filter(_, scan)).getOrElse(scan)
    -      } else {
    -        val scan = scanBuilder((projectSet ++ filterSet).toSeq)
    -        Project(projectList, filterCondition.map(Filter(_, 
scan)).getOrElse(scan))
    -      }
    -    }
    -  }
    +  @deprecated("use org.apache.spark.sql.SparkPlanner", "1.5.0")
    --- End diff --
    
    `1.6.0`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to