Github user anabranch commented on a diff in the pull request: https://github.com/apache/spark/pull/16138#discussion_r95071450 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala --- @@ -389,6 +389,20 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper { checkConsistencyBetweenInterpretedAndCodegen(ToDate, DateType) } + test("function parse_to_date") { + def testDateParse(input: String, format: String, output: String): Unit = { + val parsed = new ParseToDate(Literal(input), Literal(format)) + checkEvaluation(parsed, DateTimeUtils.fromJavaDate(Date.valueOf((output))), null) + } + // This fails but I am not sure why, it doesn't really make sense that it would + // simply because it's the right answer. I don't understand CheckEvaluation. + testDateParse("2015-07-15", "yyyy-MM-dd", "2015-07-15") + } + + test("function parse_to_timestamp") { --- End diff -- same here obviously
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org