diff --git a/tests/integration_tests/sqla_models_tests.py b/tests/integration_tests/sqla_models_tests.py index 995616bab676e..54779fcbbff9b 100644 --- a/tests/integration_tests/sqla_models_tests.py +++ b/tests/integration_tests/sqla_models_tests.py @@ -614,8 +614,11 @@ def test_should_generate_closed_and_open_time_filter_range(): table = SqlaTable( table_name="temporal_column_table", sql=( - "SELECT '2022-01-01'::timestamp as datetime_col" - " UNION SELECT '2023-01-01'::timestamp" + "SELECT '2021-12-31'::timestamp as datetime_col " + "UNION SELECT '2022-01-01'::timestamp " + "UNION SELECT '2022-03-10'::timestamp " + "UNION SELECT '2023-01-01'::timestamp " + "UNION SELECT '2023-03-10'::timestamp " ), database=get_example_database(), ) @@ -636,12 +639,15 @@ def test_should_generate_closed_and_open_time_filter_range(): """ >>> result_object.query SELECT count(*) AS count FROM - (SELECT '2022-01-01'::timestamp as datetime_col - UNION SELECT '2023-01-01'::timestamp) AS virtual_table + (SELECT '2021-12-31'::timestamp as datetime_col + UNION SELECT '2022-01-01'::timestamp + UNION SELECT '2022-03-10'::timestamp + UNION SELECT '2023-01-01'::timestamp + UNION SELECT '2023-03-10'::timestamp) AS virtual_table WHERE datetime_col >= TO_TIMESTAMP('2022-01-01 00:00:00.000000', 'YYYY-MM-DD HH24:MI:SS.US') AND datetime_col < TO_TIMESTAMP('2023-01-01 00:00:00.000000', 'YYYY-MM-DD HH24:MI:SS.US') """ - assert result_object.df.iloc[0]["count"] == 1 + assert result_object.df.iloc[0]["count"] == 2 @pytest.mark.parametrize(