Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions sqlmesh/core/test/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,7 @@ def generate_test(
cte_output = test._execute(cte_query)
ctes[cte.alias] = (
pandas_timestamp_to_pydatetime(
cte_output.apply(lambda col: col.map(_normalize_df_value)),
cte_query.named_selects,
df=cte_output.apply(lambda col: col.map(_normalize_df_value)),
)
.replace({np.nan: None})
.to_dict(orient="records")
Expand Down
2 changes: 1 addition & 1 deletion sqlmesh/utils/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def to_time_column(


def pandas_timestamp_to_pydatetime(
df: pd.DataFrame, columns_to_types: t.Optional[t.Dict[str, exp.DataType]]
df: pd.DataFrame, columns_to_types: t.Optional[t.Dict[str, exp.DataType]] = None
) -> pd.DataFrame:
import pandas as pd
from pandas.api.types import is_datetime64_any_dtype # type: ignore
Expand Down