Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/10678#discussion_r50051760
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
---
@@ -76,6 +76,118 @@ class AnalysisSuite extends AnalysisTest {
caseSensitive = false)
}
+ test("resolve sort references - filter/limit") {
+ val a = testRelation2.output(0)
+ val b = testRelation2.output(1)
+ val c = testRelation2.output(2)
+
+ // Case 1: one missing attribute is in the leaf node and another is in
the unary node
+ val plan1 = testRelation2
+ .where('a > 0).select('a, 'b)
+ .where('b > 0).select('a)
+ .limit(4)
+ .sortBy('b.asc, 'c.desc)
+ val expected1 = testRelation2
+ .where(a.cast(DoubleType) > Literal(0).cast(DoubleType)).select(a,
b, c)
+ .where(b.cast(DoubleType) > Literal(0).cast(DoubleType)).select(a,
b, c)
--- End diff --
Sure, will do. Thanks!
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]