File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/cubejs-schema-compiler/src/adapter Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -213,8 +213,8 @@ export class MysqlQuery extends BaseQuery {
213213 ' FROM date_series\n' +
214214 ' WHERE DATE_ADD(date_from, INTERVAL {{ granularity }}) <= TIMESTAMP({{ end }})\n' +
215215 ')\n' +
216- 'SELECT CAST(date_from AS TIMESTAMP ) AS date_from,\n' +
217- ' CAST(DATE_SUB(DATE_ADD(date_from, INTERVAL {{ granularity }}), INTERVAL 1000 MICROSECOND) AS TIMESTAMP ) AS date_to\n' +
216+ 'SELECT CAST(date_from AS DATETIME ) AS date_from,\n' +
217+ ' CAST(DATE_SUB(DATE_ADD(date_from, INTERVAL {{ granularity }}), INTERVAL 1000 MICROSECOND) AS DATETIME ) AS date_to\n' +
218218 'FROM date_series' ;
219219
220220 templates . statements . generated_time_series_with_cte_range_source =
@@ -227,8 +227,8 @@ export class MysqlQuery extends BaseQuery {
227227 ' FROM date_series\n' +
228228 ' WHERE DATE_ADD(date_from, INTERVAL {{ granularity }}) <= max_date\n' +
229229 ')\n' +
230- 'SELECT CAST(date_from AS TIMESTAMP ) AS date_from,\n' +
231- ' CAST(DATE_SUB(DATE_ADD(date_from, INTERVAL {{ granularity }}), INTERVAL 1000 MICROSECOND) AS TIMESTAMP ) AS date_to\n' +
230+ 'SELECT CAST(date_from AS DATETIME ) AS date_from,\n' +
231+ ' CAST(DATE_SUB(DATE_ADD(date_from, INTERVAL {{ granularity }}), INTERVAL 1000 MICROSECOND) AS DATETIME ) AS date_to\n' +
232232 'FROM date_series' ;
233233
234234 return templates ;
You can’t perform that action at this time.
0 commit comments