amaliujia commented on code in PR #38659: URL: https://github.com/apache/spark/pull/38659#discussion_r1030009940
########## connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala: ########## @@ -271,8 +273,12 @@ class SparkConnectPlanner(session: SparkSession) { } private def transformLocalRelation(rel: proto.LocalRelation): LogicalPlan = { - val attributes = rel.getAttributesList.asScala.map(transformAttribute(_)).toSeq - new org.apache.spark.sql.catalyst.plans.logical.LocalRelation(attributes) + val (rows, structType) = ArrowConverters.fromBatchWithSchemaIterator( + Seq(rel.getData.toByteArray).iterator, Review Comment: if the information is already in ARROW IPC stream, +1 to remove `row count`. I don't also think `row count` was used properly in the initial implementation (e.g. probably was not used in the CSV version). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org