File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
packages/cubejs-databricks-jdbc-driver/src Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ export class DatabricksQuery extends BaseQuery {
197197 templates . functions . GREATEST = 'GREATEST({{ args_concat }})' ;
198198 templates . functions . TRUNC = 'CASE WHEN ({{ args[0] }}) >= 0 THEN FLOOR({{ args_concat }}) ELSE CEIL({{ args_concat }}) END' ;
199199 templates . expressions . timestamp_literal = 'from_utc_timestamp(\'{{ value }}\', \'UTC\')' ;
200- templates . expressions . extract = 'EXTRACT({{ date_part }} FROM {{ expr }})' ;
200+ templates . expressions . extract = '{% if date_part|lower == "epoch" %}unix_timestamp({{ expr }}){% else %} EXTRACT({{ date_part }} FROM {{ expr }}){% endif %} ' ;
201201 templates . expressions . interval_single_date_part = 'INTERVAL \'{{ num }}\' {{ date_part }}' ;
202202 templates . quotes . identifiers = '`' ;
203203 templates . quotes . escape = '``' ;
You can’t perform that action at this time.
0 commit comments