Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinjian-db committed May 10, 2024
1 parent f7a57c8 commit 63f90ea
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,14 @@ class RewriteWithExpressionSuite extends PlanTest {
val expr = With(winExpr) {
case Seq(ref) => ref * ref
}
val plan = testRelation.window(Seq(expr.as("col")), Seq(a), Nil)
val plan = testRelation.select(expr.as("col")).analyze
comparePlans(
Optimizer.execute(plan),
testRelation
.window(Seq(winExpr.as("_windowexpression")), Seq(a), Nil)
.select(testRelation.output :+
($"_windowexpression" * $"_windowexpression").as("col"): _*)
.select(a)
.window(Seq(winExpr.as("_we0")), Seq(a), Nil)
.select(a, $"_we0", ($"_we0" * $"_we0").as("col"))
.select($"col")
.analyze
)
}
Expand Down

0 comments on commit 63f90ea

Please sign in to comment.