viirya commented on a change in pull request #33958:
URL: https://github.com/apache/spark/pull/33958#discussion_r709325939
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/planning/ScanOperationSuite.scala
##########
@@ -73,17 +80,20 @@ class ScanOperationSuite extends SparkFunSuite {
test("Filter which has the same non-deterministic expression with its child
Project") {
val filter1 = Filter(EqualTo(colR, Literal(1)), Project(Seq(colA, aliasR),
relation))
- assert(ScanOperation.unapply(filter1).isEmpty)
+ filter1 match {
+ case ScanOperation(projects, filters, _: Filter) =>
+ assert(projects.size === 2)
+ assert(filters.isEmpty)
+ case _ => assert(false)
+ }
}
test("Deterministic filter with a child Project with a non-deterministic
expression") {
val filter2 = Filter(EqualTo(colA, Literal(1)), Project(Seq(colA, aliasR),
relation))
filter2 match {
- case ScanOperation(projects, filters, _: LocalRelation) =>
+ case ScanOperation(projects, filters, _: Filter) =>
Review comment:
Above is for previous behavior, right? So it sounds like a (possible)
bug?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]