From b8aa735dd98cc74df10f3fcea980ee064b4c7c15 Mon Sep 17 00:00:00 2001 From: Pavel Tiunov Date: Wed, 1 Nov 2023 21:06:15 -0700 Subject: [PATCH] chore(cubesql): SQL push down support for IS NULL and IS NOT NULL expressions -- missing templates --- packages/cubejs-schema-compiler/src/adapter/BaseQuery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js index 95c4d4635c3fd..852e1895d991e 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js +++ b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js @@ -2451,7 +2451,8 @@ class BaseQuery { }, expressions: { column_aliased: '{{expr}} {{quoted_alias}}', - case: 'CASE {% if expr %}{{ expr }} {% endif %}{% for when, then in when_then %}WHEN {{ when }} THEN {{ then }}{% endfor %}{% if else_expr %} ELSE {{ else_expr }}{% endif %} END', + case: 'CASE{% if expr %}{{ expr }} {% endif %}{% for when, then in when_then %} WHEN {{ when }} THEN {{ then }}{% endfor %}{% if else_expr %} ELSE {{ else_expr }}{% endif %} END', + is_null: '{{ expr }} {% if negate %}NOT {% endif %}IS NULL', binary: '({{ left }} {{ op }} {{ right }})', sort: '{{ expr }} {% if asc %}ASC{% else %}DESC{% endif %}{% if nulls_first %} NULLS FIRST{% endif %}', cast: 'CAST({{ expr }} AS {{ data_type }})',