File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/cubejs-schema-compiler/src/adapter Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class BigqueryQuery extends BaseQuery {
4242 }
4343
4444 public convertTz ( field ) {
45- return `DATETIME(${ field } , '${ this . timezone } ')` ;
45+ return `DATETIME(${ this . timeStampCast ( field ) } , '${ this . timezone } ')` ;
4646 }
4747
4848 public timeStampCast ( value ) {
@@ -262,7 +262,7 @@ export class BigqueryQuery extends BaseQuery {
262262 templates . expressions . binary = '{% if op == \'%\' %}MOD({{ left }}, {{ right }}){% else %}({{ left }} {{ op }} {{ right }}){% endif %}' ;
263263 templates . expressions . interval = 'INTERVAL {{ interval }}' ;
264264 templates . expressions . extract = 'EXTRACT({% if date_part == \'DOW\' %}DAYOFWEEK{% elif date_part == \'DOY\' %}DAYOFYEAR{% else %}{{ date_part }}{% endif %} FROM {{ expr }})' ;
265- templates . expressions . timestamp_literal = 'TIMESTAMP(\'{{ value }}\')' ;
265+ templates . expressions . timestamp_literal = 'DATETIME( TIMESTAMP(\'{{ value }}\') )' ;
266266 delete templates . expressions . ilike ;
267267 delete templates . expressions . like_escape ;
268268 templates . filters . like_pattern = 'CONCAT({% if start_wild %}\'%\'{% else %}\'\'{% endif %}, LOWER({{ value }}), {% if end_wild %}\'%\'{% else %}\'\'{% endif %})' ;
You can’t perform that action at this time.
0 commit comments