cloud-fan commented on code in PR #48240: URL: https://github.com/apache/spark/pull/48240#discussion_r1777210775
########## sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala: ########## @@ -1832,4 +1832,18 @@ class AnalysisSuite extends AnalysisTest with Matchers { preemptedError.clear() assert(preemptedError.getErrorOpt().isEmpty) } + + test("SPARK-49782: ResolveDataFrameDropColumns rule resolves complex UnresolvedAttribute") { + val function = UnresolvedFunction("trim", Seq(UnresolvedAttribute("i")), isDistinct = false) + val addF = Project(Seq(UnresolvedAttribute("i"), Alias(function, "f")()), testRelation5) + val dropF = DataFrameDropColumns(Seq(UnresolvedAttribute("f")), addF) + val dropRule = dropF.collectFirst { Review Comment: This looks unnecessary. We constructed `DataFrameDropColumns` explicitly and no need to check its existence. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org