You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2018/01/18 03:00:01 UTC

[jira] [Resolved] (SPARK-23079) Fix query constraints propagation with aliases

     [ https://issues.apache.org/jira/browse/SPARK-23079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-23079.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

Issue resolved by pull request 20278
[https://github.com/apache/spark/pull/20278]

> Fix query constraints propagation with aliases
> ----------------------------------------------
>
>                 Key: SPARK-23079
>                 URL: https://issues.apache.org/jira/browse/SPARK-23079
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Major
>             Fix For: 2.3.0
>
>
> Previously, PR #19201 fix the problem of non-converging constraints.
> After that PR #19149 improve the loop and constraints is inferred only once.
> So the problem of non-converging constraints is gone.
> Also, in current code, the case below will fail.
> ```
> spark.range(5).write.saveAsTable("t")
> val t = spark.read.table("t")
> val left = t.withColumn("xid", $"id" + lit(1)).as("x")
> val right = t.withColumnRenamed("id", "xid").as("y")
> val df = left.join(right, "xid").filter("id = 3").toDF()
> checkAnswer(df, Row(4, 3))
> ```
> Because of `aliasMap` replace all the aliased child. See the test case in PR for details.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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