File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/cubejs-databricks-jdbc-driver/src Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,16 @@ export class DatabricksQuery extends BaseQuery {
178178 templates . expressions . interval_single_date_part = 'INTERVAL \'{{ num }}\' {{ date_part }}' ;
179179 templates . quotes . identifiers = '`' ;
180180 templates . quotes . escape = '``' ;
181+ templates . statements . time_series_select = 'SELECT date_from::timestamp AS `date_from`,\n' +
182+ 'date_to::timestamp AS `date_to` \n' +
183+ 'FROM(\n' +
184+ ' VALUES ' +
185+ '{% for time_item in seria %}' +
186+ '(\'{{ time_item | join(\'\\\', \\\'\') }}\')' +
187+ '{% if not loop.last %}, {% endif %}' +
188+ '{% endfor %}' +
189+ ') AS dates (date_from, date_to)' ;
190+
181191 // TODO: Databricks has `TIMESTAMP_NTZ` with logic similar to Pg's `TIMESTAMP`
182192 // but that requires Runtime 13.3+. Should this be enabled?
183193 // templates.types.timestamp = 'TIMESTAMP_NTZ';
You can’t perform that action at this time.
0 commit comments