fix: Apply normalization to all dttm columns (#25147)

(cherry picked from commit 58fcd292a9)
This commit is contained in:
Kamil Gabryjelski
2023-10-06 18:47:00 +02:00
committed by Michael S. Molina
parent 8b66603566
commit dd769eb7a0
5 changed files with 161 additions and 10 deletions

View File

@@ -836,11 +836,9 @@ def test_special_chars_in_column_name(app_context, physical_dataset):
query_object = qc.queries[0]
df = qc.get_df_payload(query_object)["df"]
if query_object.datasource.database.backend == "sqlite":
# sqlite returns string as timestamp column
assert df["time column with spaces"][0] == "2002-01-03 00:00:00"
assert df["I_AM_A_TRUNC_COLUMN"][0] == "2002-01-01 00:00:00"
else:
# sqlite doesn't have timestamp columns
if query_object.datasource.database.backend != "sqlite":
assert df["time column with spaces"][0].strftime("%Y-%m-%d") == "2002-01-03"
assert df["I_AM_A_TRUNC_COLUMN"][0].strftime("%Y-%m-%d") == "2002-01-01"