Skip to content

Commit

Permalink
[VL] Enable make_date function
Browse files Browse the repository at this point in the history
  • Loading branch information
zhli1142015 committed Feb 7, 2025
1 parent 6cb0b56 commit 9af6b27
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ object CHExpressionUtil {
FROM_UTC_TIMESTAMP -> UtcTimestampValidator(),
STACK -> DefaultValidator(),
RAISE_ERROR -> DefaultValidator(),
WIDTH_BUCKET -> DefaultValidator()
WIDTH_BUCKET -> DefaultValidator(),
MAKE_DATE -> DefaultValidator()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -1530,4 +1530,11 @@ abstract class ScalarFunctionsValidateSuite extends FunctionsValidateSuite {
}
}
}

test("make_date") {
runQueryAndCompare(
"select make_date(2025, 2, 7), make_date(2024, 11, null), make_date(2024, 11, 50)") {
checkGlutenOperatorMatch[ProjectExecTransformer]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ object ExpressionMappings {
Sig[MonthsBetween](MONTHS_BETWEEN),
Sig[DateFromUnixDate](DATE_FROM_UNIX_DATE),
Sig[UnixDate](UNIX_DATE),
Sig[MakeDate](MAKE_DATE),
Sig[MakeTimestamp](MAKE_TIMESTAMP),
Sig[MakeYMInterval](MAKE_YM_INTERVAL),
Sig[ToUTCTimestamp](TO_UTC_TIMESTAMP),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ object ExpressionNames {
final val MONTHS_BETWEEN = "months_between"
final val DATE_FROM_UNIX_DATE = "date_from_unix_date"
final val UNIX_DATE = "unix_date"
final val MAKE_DATE = "make_date"
final val MAKE_TIMESTAMP = "make_timestamp"
final val MAKE_YM_INTERVAL = "make_ym_interval"
final val TO_UTC_TIMESTAMP = "to_utc_timestamp"
Expand Down

0 comments on commit 9af6b27

Please sign in to comment.