File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
packages/cubejs-databricks-jdbc-driver/src Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ export class DatabricksQuery extends BaseQuery {
186
186
187
187
public sqlTemplates ( ) {
188
188
const templates = super . sqlTemplates ( ) ;
189
+ templates . functions . CURRENTDATE = 'CURRENT_DATE' ;
189
190
templates . functions . DATETRUNC = 'DATE_TRUNC({{ args_concat }})' ;
190
191
templates . functions . DATEPART = 'DATE_PART({{ args_concat }})' ;
191
192
templates . functions . BTRIM = 'TRIM({% if args[1] is defined %}{{ args[1] }} FROM {% endif %}{{ args[0] }})' ;
@@ -197,6 +198,7 @@ export class DatabricksQuery extends BaseQuery {
197
198
templates . functions . TRUNC = 'CASE WHEN ({{ args[0] }}) >= 0 THEN FLOOR({{ args_concat }}) ELSE CEIL({{ args_concat }}) END' ;
198
199
templates . expressions . timestamp_literal = 'from_utc_timestamp(\'{{ value }}\', \'UTC\')' ;
199
200
templates . expressions . extract = 'EXTRACT({{ date_part }} FROM {{ expr }})' ;
201
+ templates . expressions . interval_single_date_part = 'INTERVAL \'{{ num }}\' {{ date_part }}' ;
200
202
templates . quotes . identifiers = '`' ;
201
203
templates . quotes . escape = '``' ;
202
204
// TODO: Databricks has `TIMESTAMP_NTZ` with logic similar to Pg's `TIMESTAMP`
You can’t perform that action at this time.
0 commit comments