Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14685#discussion_r75106052
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala ---
@@ -56,30 +44,29 @@ trait ExecSubqueryExpression extends SubqueryExpression
{
* This is the physical copy of ScalarSubquery to be used inside SparkPlan.
*/
case class ScalarSubquery(
- executedPlan: SubqueryExec,
+ plan: SubqueryExec,
exprId: ExprId)
extends ExecSubqueryExpression {
- override def dataType: DataType =
executedPlan.schema.fields.head.dataType
+ override def dataType: DataType = plan.schema.fields.head.dataType
override def children: Seq[Expression] = Nil
override def nullable: Boolean = true
- override def toString: String = executedPlan.simpleString
-
- def withExecutedPlan(plan: SubqueryExec): ExecSubqueryExpression =
copy(executedPlan = plan)
+ override def toString: String = plan.simpleString
+ override def withNewPlan(query: SubqueryExec): ScalarSubquery =
copy(plan = query)
override def semanticEquals(other: Expression): Boolean = other match {
- case s: ScalarSubquery => executedPlan.sameResult(executedPlan)
+ case s: ScalarSubquery => plan.sameResult(s.plan)
--- End diff --
This fixes a small bug in `sematicEquals`.
---
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]