You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by eatoncys <gi...@git.apache.org> on 2018/12/10 12:16:40 UTC

[GitHub] spark pull request #23262: [SPARK-26312][SQL]Replace RDDConversions.rowToRow...

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

    https://github.com/apache/spark/pull/23262#discussion_r240188043
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala ---
    @@ -416,7 +416,12 @@ case class DataSourceStrategy(conf: SQLConf) extends Strategy with Logging with
           output: Seq[Attribute],
           rdd: RDD[Row]): RDD[InternalRow] = {
         if (relation.relation.needConversion) {
    -      execution.RDDConversions.rowToRowRdd(rdd, output.map(_.dataType))
    +      val converters = RowEncoder(StructType.fromAttributes(output))
    +      rdd.mapPartitions { iterator =>
    +        iterator.map { r =>
    --- End diff --
    
    Modified, thanks.


---

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