You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ioana-delaney <gi...@git.apache.org> on 2016/06/01 20:39:40 UTC

[GitHub] spark pull request #13418: [SPARK-15677][SQL] Query with scalar sub-query in...

Github user ioana-delaney commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13418#discussion_r65437967
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala ---
    @@ -1468,7 +1468,8 @@ object DecimalAggregates extends Rule[LogicalPlan] {
      */
     object ConvertToLocalRelation extends Rule[LogicalPlan] {
       def apply(plan: LogicalPlan): LogicalPlan = plan transform {
    -    case Project(projectList, LocalRelation(output, data)) =>
    +    case p @ Project(projectList, LocalRelation(output, data))
    +        if !p.expressions.exists(ScalarSubquery.hasScalarSubquery) =>
    --- End diff --
    
    @davies Sorry for the delay in replying. I am new to the Spark code. I've looked at Unevaluable expressions. My findings are that checking for Unevaluable expressions would be too general since a lot of expressions mix in this trait. For example, AttributeReference is one of them. If we explicitly check for Unevaluable expressions, a simple query of the form "select c1 from t1"
    would be regressed. Let me know I misunderstood your requirement. Thanks.


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