Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 4c5cb57

Browse files
authored
fix: use TIMESTAMP_SUB for TimstampSub operation (#40)
Incorrect SQL expression was specified for TimestampSub.
1 parent c3d188e commit 4c5cb57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ibis_bigquery/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def _formatter(translator, expr):
419419
'TIMESTAMP_ADD', {'h', 'm', 's', 'ms', 'us'}
420420
),
421421
ops.TimestampSub: _timestamp_op(
422-
'TIMESTAMP_DIFF', {'h', 'm', 's', 'ms', 'us'}
422+
'TIMESTAMP_SUB', {'h', 'm', 's', 'ms', 'us'}
423423
),
424424
ops.DateAdd: _timestamp_op('DATE_ADD', {'D', 'W', 'M', 'Q', 'Y'}),
425425
ops.DateSub: _timestamp_op('DATE_SUB', {'D', 'W', 'M', 'Q', 'Y'}),

0 commit comments

Comments
 (0)