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 {
186186
187187 public sqlTemplates ( ) {
188188 const templates = super . sqlTemplates ( ) ;
189+ templates . functions . CURRENTDATE = 'CURRENT_DATE' ;
189190 templates . functions . DATETRUNC = 'DATE_TRUNC({{ args_concat }})' ;
190191 templates . functions . DATEPART = 'DATE_PART({{ args_concat }})' ;
191192 templates . functions . BTRIM = 'TRIM({% if args[1] is defined %}{{ args[1] }} FROM {% endif %}{{ args[0] }})' ;
@@ -197,6 +198,7 @@ export class DatabricksQuery extends BaseQuery {
197198 templates . functions . TRUNC = 'CASE WHEN ({{ args[0] }}) >= 0 THEN FLOOR({{ args_concat }}) ELSE CEIL({{ args_concat }}) END' ;
198199 templates . expressions . timestamp_literal = 'from_utc_timestamp(\'{{ value }}\', \'UTC\')' ;
199200 templates . expressions . extract = 'EXTRACT({{ date_part }} FROM {{ expr }})' ;
201+ templates . expressions . interval_single_date_part = 'INTERVAL \'{{ num }}\' {{ date_part }}' ;
200202 templates . quotes . identifiers = '`' ;
201203 templates . quotes . escape = '``' ;
202204 // TODO: Databricks has `TIMESTAMP_NTZ` with logic similar to Pg's `TIMESTAMP`
You can’t perform that action at this time.
0 commit comments