diff options
author | jiangxingbo <jiangxb1987@gmail.com> | 2016-10-26 20:12:20 +0200 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-10-26 20:12:20 +0200 |
commit | fa7d9d70825a6816495d239da925d0087f7cb94f (patch) | |
tree | 2b0cbdef51c320e69c4c55507ae15724a3773a22 /data/mllib | |
parent | 7ac70e7ba8d610a45c21a70dc28e4c989c19451b (diff) | |
download | spark-fa7d9d70825a6816495d239da925d0087f7cb94f.tar.gz spark-fa7d9d70825a6816495d239da925d0087f7cb94f.tar.bz2 spark-fa7d9d70825a6816495d239da925d0087f7cb94f.zip |
[SPARK-18063][SQL] Failed to infer constraints over multiple aliases
## What changes were proposed in this pull request?
The `UnaryNode.getAliasedConstraints` function fails to replace all expressions by their alias where constraints contains more than one expression to be replaced.
For example:
```
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
```
currently outputs:
```
ExpressionSet(Seq(
IsNotNull(resolveColumn(multiAlias.analyze, "x")),
IsNotNull(resolveColumn(multiAlias.analyze, "y"))
)
```
The constraint `resolveColumn(multiAlias.analyze, "x") === resolveColumn(multiAlias.analyze, "y") + 10)` is missing.
## How was this patch tested?
Add new test cases in `ConstraintPropagationSuite`.
Author: jiangxingbo <jiangxb1987@gmail.com>
Closes #15597 from jiangxb1987/alias-constraints.
Diffstat (limited to 'data/mllib')
0 files changed, 0 insertions, 0 deletions