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
code review 2
  • Loading branch information
rxin committed Nov 19, 2015
commit 1ddbe84505344ce4bbfb7d34fc56d4becfd1f224
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,14 @@ class AnalysisSuite extends AnalysisTest {
val max = (System.currentTimeMillis() + 1) * 1000

val lits = new scala.collection.mutable.ArrayBuffer[Long]
plan.transformAllExpressions{ case e: Literal =>
plan.transformAllExpressions { case e: Literal =>
lits += e.value.asInstanceOf[Long]
e
}
assert(lits.size == 2)
assert(lits(0) >= min && lits(0) <= max)
assert(lits(1) >= min && lits(1) <= max)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also assert that lits(0) == lits(1)?

assert(lits(0) == lits(1))
}

test("analyzer should replace current_date with literals") {
Expand Down