You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/14 05:28:44 UTC
[GitHub] [spark] viirya commented on a diff in pull request #37187: [SPARK-39748][SQL][SS][FOLLOWUP] Fix a bug on column stat in LogicalRDD on mismatching exprIDs
viirya commented on code in PR #37187:
URL: https://github.com/apache/spark/pull/37187#discussion_r920764005
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala:
##########
@@ -116,10 +116,17 @@ case class LogicalRDD(
case e: Attribute => rewrite.getOrElse(e, e)
}.asInstanceOf[SortOrder])
+ val rewrittenOriginLogicalPlan = originLogicalPlan.map { plan =>
+ val projectList = output.map { attr =>
+ Alias(attr, attr.name)(exprId = rewrite.getOrElse(attr, attr).exprId)
Review Comment:
As `rewrite` is a map for all output. We already can get `rewrite(attr)`. `getOrElse` is redundant.
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org