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 [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