You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jiang Xingbo (JIRA)" <ji...@apache.org> on 2016/10/22 06:33:58 UTC

[jira] [Created] (SPARK-18063) Failed to infer constraints over multiple aliases

Jiang Xingbo created SPARK-18063:
------------------------------------

             Summary: Failed to infer constraints over multiple aliases
                 Key: SPARK-18063
                 URL: https://issues.apache.org/jira/browse/SPARK-18063
             Project: Spark
          Issue Type: Bug
          Components: SQL
            Reporter: Jiang Xingbo
            Priority: Minor


The `UnaryNode.getAliasedConstraints` function fails to replace all expressions by their alias where constraints contains more than one expression to be replaced. For example:
{code}
val tr = LocalRelation('a.int, 'b.string, 'c.int)
val multiAlias = tr.where('a === 'c + 10).select('a.as('x), 'c.as('y))
multiAlias.analyze.constraints
{code}
currently outputs:
{code}
ExpressionSet(Seq(
    IsNotNull(resolveColumn(multiAlias.analyze, "x")),
    IsNotNull(resolveColumn(multiAlias.analyze, "y"))
)
{code}
The constraint {code}resolveColumn(multiAlias.analyze, "x") === resolveColumn(multiAlias.analyze, "y") + 10){code} is missing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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