We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b073f8a commit 99ac0a2Copy full SHA for 99ac0a2
python/tests/test_functions.py
@@ -1087,6 +1087,20 @@ def test_temporal_formatter_requires_expr():
1087
f.to_time(literal("12:30:45"), "not-an-expr")
1088
1089
1090
+def test_today_returns_date32(df):
1091
+ result = df.select(f.today().alias("today")).collect()[0]
1092
+ assert result.column(0).type == pa.date32()
1093
+
1094
1095
+def test_today_alias_matches_current_date(df):
1096
+ result = df.select(
1097
+ f.current_date().alias("current_date"),
1098
+ f.today().alias("today"),
1099
+ ).collect()[0]
1100
1101
+ assert result.column(0) == result.column(1)
1102
1103
1104
def test_arrow_cast(df):
1105
df = df.select(
1106
# we use `string_literal` to return utf8 instead of `literal` which returns
0 commit comments