spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marmbrus <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-6638] [SQL] Improve performance of Stri...
Date Tue, 14 Apr 2015 22:50:42 GMT
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5350#discussion_r28379068
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/sources/DataSourceStrategy.scala
---
    @@ -102,20 +102,29 @@ private[sql] object DataSourceStrategy extends Strategy {
             projectList.asInstanceOf[Seq[Attribute]] // Safe due to if above.
               .map(relation.attributeMap)            // Match original case of attributes.
     
    -      val scan =
    -        execution.PhysicalRDD(
    -          projectList.map(_.toAttribute),
    +      val scan = createPhysicalRDD(relation.relation, projectList.map(_.toAttribute),
               scanBuilder(requestedColumns, pushedFilters))
           filterCondition.map(execution.Filter(_, scan)).getOrElse(scan)
         } else {
           val requestedColumns = (projectSet ++ filterSet).map(relation.attributeMap).toSeq
     
    -      val scan =
    -        execution.PhysicalRDD(requestedColumns, scanBuilder(requestedColumns, pushedFilters))
    +      val scan = createPhysicalRDD(relation.relation, requestedColumns,
    +        scanBuilder(requestedColumns, pushedFilters))
           execution.Project(projectList, filterCondition.map(execution.Filter(_, scan)).getOrElse(scan))
         }
       }
     
    +  private[this] def createPhysicalRDD(relation: BaseRelation,
    +                                      output: Seq[Attribute],
    +                                      rdd: RDD[Row]) = {
    --- End diff --
    
    indent 4 spaces on next line.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message