Browse Source

docs: add changelog for PR 13640

zmstone 1 year ago
parent
commit
a86f8f4fc0
1 changed files with 17 additions and 0 deletions
  1. 17 0
      changes/ce/feat-13640.en.md

+ 17 - 0
changes/ce/feat-13640.en.md

@@ -0,0 +1,17 @@
+Add two new rule SQL functions `coalesce/2` and `coalesce_ne/2`.
+
+The two functions can help to simplify null-checks in rule SQL.
+For example
+
+```
+SELECT
+    CASE
+        WHEN is_null(payload.path.to.value) THEN
+            0
+        ELSE
+            payload.path.to.value
+    END AS my_value
+```
+
+can be as simple as: `SELECT coalesce(payload.path.to.value, 0) AS my_value`.
+