We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6acae68 + dea0e54 commit d514ebeCopy full SHA for d514ebe
src/metabase/driver/teradata.clj
@@ -234,4 +234,10 @@
234
(defmethod sql.qp/current-datetime-fn :teradata [_] now)
235
236
; TODO check if overriding apply-top-level-clause could make nested queries work
237
-(defmethod driver/supports? [:teradata :nested-queries] [_ _] false)
+(defmethod driver/supports? [:teradata :nested-queries] [_ _] false)
238
+
239
+(defmethod driver/date-add :teradata [_ dt amount unit]
240
+ "0 amount not handled, would be kind of pointless."
241
+ (if (> amount 0)
242
+ (hx/+ (hx/->timestamp dt) (hsql/raw (format "INTERVAL '%d' %s" (int amount) (name unit))))
243
+ (hx/- (hx/->timestamp dt) (hsql/raw (format "INTERVAL '%d' %s" (Math/abs (int amount)) (name unit))))))
0 commit comments