-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29231][SQL] Constraints should be inferred from cast equality constraint #27252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
048a0ec
34c7001
7dcfe91
2060190
420058b
8dcd076
47eadf4
d283028
d055eba
4b14b3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -278,6 +278,17 @@ class InferFiltersFromConstraintsSuite extends PlanTest { | |
| Some("right.b".attr === "left.a".attr.cast(LongType))).foreach { condition => | ||
| testConstraintsAfterJoin(originalLeft, originalRight, left, right, Inner, condition) | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also test
|
||
|
|
||
| Seq(Some("left.a".attr === "right.b".attr.cast(IntegerType)), | ||
| Some("right.b".attr.cast(IntegerType) === "left.a".attr)).foreach { condition => | ||
| testConstraintsAfterJoin( | ||
| originalLeft, | ||
| originalRight, | ||
| testRelation1.where(IsNotNull('a)).subquery('left), | ||
| right, | ||
| Inner, | ||
| condition) | ||
| } | ||
| } | ||
|
|
||
| test("Constraints shouldn't be inferred from cast equality constraint(filter lower data type)") { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of test coverage, its better to test both cases (left/right-side casts)? I have the same comment in the test below.