From 74dcf39eff6e0d635de4fada4b049c1345dcaddb Mon Sep 17 00:00:00 2001 From: Navin Kumar Date: Mon, 27 Nov 2023 16:37:25 -0800 Subject: [PATCH] Add fallback test for when config option is not enabled Signed-off-by: Navin Kumar --- integration_tests/src/main/python/date_time_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/integration_tests/src/main/python/date_time_test.py b/integration_tests/src/main/python/date_time_test.py index 2340ff75000..d68dd93efac 100644 --- a/integration_tests/src/main/python/date_time_test.py +++ b/integration_tests/src/main/python/date_time_test.py @@ -285,6 +285,14 @@ def test_from_utc_timestamp(data_gen, time_zone): assert_gpu_and_cpu_are_equal_collect( lambda spark: unary_op_df(spark, data_gen).select(f.from_utc_timestamp(f.col('a'), time_zone))) +@allow_non_gpu('ProjectExec') +@pytest.mark.parametrize('time_zone', ["Asia/Shanghai", "EST", "MST", "VST", "PST", "NST", "AST", "America/Los_Angeles", "America/New_York", "America/Chicago"], ids=idfn) +@pytest.mark.parametrize('data_gen', [timestamp_gen], ids=idfn) +def test_from_utc_timestamp_non_utc_fallback(data_gen, time_zone): + assert_gpu_fallback_collect( + lambda spark: unary_op_df(spark, data_gen).select(f.from_utc_timestamp(f.col('a'), time_zone)), + 'FromUTCTimestamp') + @allow_non_gpu('ProjectExec') @pytest.mark.parametrize('time_zone', ["PST", "NST", "AST", "America/Los_Angeles", "America/New_York", "America/Chicago"], ids=idfn) @pytest.mark.parametrize('data_gen', [timestamp_gen], ids=idfn)