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

[GitHub] spark pull request: [SPARK-10327][SQL] Cache Table is not working ...

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

    https://github.com/apache/spark/pull/8494#discussion_r43490797
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala ---
    @@ -135,16 +135,25 @@ abstract class LogicalPlan extends QueryPlan[LogicalPlan] with Logging {
       /** Args that have cleaned such that differences in expression id should not affect equality */
       protected lazy val cleanArgs: Seq[Any] = {
         val input = children.flatMap(_.output)
    +    def cleanExpression(e: Expression) = e match {
    +      case a: Alias =>
    +        // As the root of the expression, Alias will always take an arbitrary exprId, we need
    +        // to erase that for equality testing.
    +        val cleanedExprId = Alias(a.child, a.name)(ExprId(-1), a.qualifiers)
    +        BindReferences.bindReference(cleanedExprId, input, allowFailures = true)
    +      case other => BindReferences.bindReference(other, input, allowFailures = true)
    +    }
    +
         productIterator.map {
    --- End diff --
    
    Hmmm, yeah that would probably work.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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