ibis
ibis copied to clipboard
bug: join between tz-naive and tz-aware should fail early
this join should raise on dtype incompat early.
diff --git a/ibis/pandas/execution/tests/test_join.py b/ibis/pandas/execution/tests/test_join.py
index f670965..2157803 100644
--- a/ibis/pandas/execution/tests/test_join.py
+++ b/ibis/pandas/execution/tests/test_join.py
@@ -290,3 +290,10 @@ def test_keyed_asof_join(
expected = pd.merge_asof(
time_keyed_df1, time_keyed_df2, on='time', by='key')
tm.assert_frame_equal(result[expected.columns], expected)
+
+
+def test_invalid_datetime_with_tz_aware(time_left, time_right):
+ time_left = time_left.mutate(
+ time=time_left.time.cast('timestamp("UTC")'))
+ expr = time_left.inner_join(time_right, 'time')
+ result = expr.execute()
This might be a thing that we defer to backends. Some backends let you compare naive and non-naive timestamps.
Should We raise during the compilation on each backend?
This can probably be done with a new rlz rule, like if_is_timestamp_both_are_the_same_timezone_awarenessness
Closing as stale.