Skip to content

Commit 2ab2ea0

Browse files
committed
test(flink): add test for previously-ignored unit
1 parent 0fa17a9 commit 2ab2ea0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ibis/backends/flink/tests/test_compiler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import pytest
44
from pytest import param
55

6+
import ibis
7+
68

79
def test_sum(simple_table, assert_sql):
810
expr = simple_table.a.sum()
@@ -98,3 +100,9 @@ def test_having(simple_table, assert_sql):
98100
.aggregate(simple_table.b.sum().name("b_sum"))
99101
)
100102
assert_sql(expr)
103+
104+
105+
def test_timestamp_cast_to_seconds_respects_unit():
106+
expr = ibis.now()
107+
compiled = expr.cast("timestamp('s')").compile(dialect="flink")
108+
assert "yyyy-MM-dd HH:mm:ss.SSS" not in compiled

0 commit comments

Comments
 (0)