File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
packages/cubejs-schema-compiler/src/adapter Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export class PostgresQuery extends BaseQuery {
5050 templates . functions . DATETRUNC = 'DATE_TRUNC({{ args_concat }})' ;
5151 templates . functions . CONCAT = 'CONCAT({% for arg in args %}CAST({{arg}} AS TEXT){% if not loop.last %},{% endif %}{% endfor %})' ;
5252 templates . functions . DATEPART = 'DATE_PART({{ args_concat }})' ;
53+ templates . functions . CURRENTDATE = 'CURRENT_DATE' ;
54+ templates . functions . NOW = 'NOW({{ args_concat }})' ;
5355 // DATEADD is being rewritten to DATE_ADD
5456 // templates.functions.DATEADD = '({{ args[2] }} + \'{{ interval }} {{ date_part }}\'::interval)';
5557 delete templates . functions . DATEDIFF ;
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ export class SnowflakeQuery extends BaseQuery {
5454 const templates = super . sqlTemplates ( ) ;
5555 templates . functions . DATETRUNC = 'DATE_TRUNC({{ args_concat }})' ;
5656 templates . functions . DATEPART = 'DATE_PART({{ args_concat }})' ;
57+ templates . functions . CURRENTDATE = 'CURRENT_DATE' ;
58+ templates . functions . NOW = 'CURRENT_TIMESTAMP' ;
5759 templates . functions . LOG = 'LOG({% if args[1] is undefined %}10, {% endif %}{{ args_concat }})' ;
5860 templates . functions . DLOG10 = 'LOG(10, {{ args_concat }})' ;
5961 templates . functions . CHARACTERLENGTH = 'LENGTH({{ args[0] }})' ;
You can’t perform that action at this time.
0 commit comments