Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix Rand expression
  • Loading branch information
brkyvz committed Apr 30, 2015
commit 4234c3af112fcd273fd097717274c32408161111
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ class ConstantFoldingSuite extends PlanTest {
val originalQuery =
testRelation
.select(
Rand + Literal(1) as Symbol("c1"),
Rand() + Literal(1) as Symbol("c1"),
Sum('a) as Symbol("c2"))

val optimized = Optimize.execute(originalQuery.analyze)

val correctAnswer =
testRelation
.select(
Rand + Literal(1.0) as Symbol("c1"),
Rand() + Literal(1.0) as Symbol("c1"),
Sum('a) as Symbol("c2"))
.analyze

Expand Down