Skip to content

Commit ae6f64f

Browse files
committed
add single intervals transformation for databricks
1 parent ead97b4 commit ae6f64f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export class DatabricksQuery extends BaseQuery {
197197
templates.functions.TRUNC = 'CASE WHEN ({{ args[0] }}) >= 0 THEN FLOOR({{ args_concat }}) ELSE CEIL({{ args_concat }}) END';
198198
templates.expressions.timestamp_literal = 'from_utc_timestamp(\'{{ value }}\', \'UTC\')';
199199
templates.expressions.extract = 'EXTRACT({{ date_part }} FROM {{ expr }})';
200+
templates.expressions.interval_single_date_part = 'INTERVAL \'{{ num }}\' {{ date_part }}';
200201
templates.quotes.identifiers = '`';
201202
templates.quotes.escape = '``';
202203
// TODO: Databricks has `TIMESTAMP_NTZ` with logic similar to Pg's `TIMESTAMP`

0 commit comments

Comments
 (0)