spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hvanhovell <>
Subject [GitHub] spark pull request #14307: [SPARK-16672][SQL] SQLBuilder should not raise ex...
Date Mon, 25 Jul 2016 10:09:24 GMT
Github user hvanhovell commented on a diff in the pull request:
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/catalyst/SQLBuilder.scala ---
    @@ -512,8 +512,12 @@ class SQLBuilder(logicalPlan: LogicalPlan) extends Logging {
               ScalarSubquery(rewrite, Seq.empty, exprId)
             case PredicateSubquery(query, conditions, false, exprId) =>
    -          val plan = Project(Seq(Alias(Literal(1), "1")()),
    -            Filter(conditions.reduce(And), addSubqueryIfNeeded(query)))
    +          val plan = if (conditions.isEmpty) {
    +            addSubqueryIfNeeded(query)
    --- End diff --
    Minor: it is a little more readable if we move the `addSubqueryIfNeeded(query)` out of
the if...else... and into a separate variable.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message