You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by chriso <gi...@git.apache.org> on 2017/03/02 06:03:48 UTC

[GitHub] spark issue #16998: [SPARK-19665][SQL] Improve constraint propagation

Github user chriso commented on the issue:

    https://github.com/apache/spark/pull/16998
  
    I just run into the same issue with `spark-2.1.0`
    
    Here's a minimal test case:
    
    ```scala
    val max = 12 // try increasing this
    
    val filter = (for (i <- 0 to max) yield col("value") <=> i) reduce (_ || _)
    val projections = for (i <- 0 to max) yield (col("value") <=> i).as(s"value_$i")
    
    val otherFilter = lit(true) // this can be anything
    
    val df = Seq.empty[Int].toDF
    val result = df.filter(otherFilter)
      .select(col("value") +: projections: _*)
      .filter(filter).filter(otherFilter)
    
    result.explain
    ```
    
    The final `explain` call hangs [here](https://github.com/apache/spark/blob/db0ddce523bb823cba996e92ef36ceca31492d2c/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala#L325-L328).


---
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