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
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
}
}
// Test escaping of format
GenerateUnsafeProjection.generate(FromUnixTime(Literal(0L), Literal("\"quote")) :: Nil)
GenerateUnsafeProjection.generate(FromUnixTime(Literal(0L), Literal("\"quote"), JST_OPT) :: Nil)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if the timezone doesn't matter, shall we use UTC?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Particular time zone doesn't matter here, we just check that codegen doesn't throw any exception.

}

test("unix_timestamp") {
Expand Down Expand Up @@ -862,7 +862,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
}
// Test escaping of format
GenerateUnsafeProjection.generate(
UnixTimestamp(Literal("2015-07-24"), Literal("\"quote")) :: Nil)
UnixTimestamp(Literal("2015-07-24"), Literal("\"quote"), JST_OPT) :: Nil)
}

test("to_unix_timestamp") {
Expand Down Expand Up @@ -940,7 +940,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
}
// Test escaping of format
GenerateUnsafeProjection.generate(
ToUnixTimestamp(Literal("2015-07-24"), Literal("\"quote")) :: Nil)
ToUnixTimestamp(Literal("2015-07-24"), Literal("\"quote"), JST_OPT) :: Nil)
}

test("datediff") {
Expand Down