Просмотр исходного кода

chore: update app version && changes

firest 2 лет назад
Родитель
Сommit
1f7ede90a4
2 измененных файлов с 12 добавлено и 1 удалено
  1. 1 1
      apps/emqx_rule_engine/src/emqx_rule_engine.app.src
  2. 11 0
      changes/ce/fix-10728.en.md

+ 1 - 1
apps/emqx_rule_engine/src/emqx_rule_engine.app.src

@@ -2,7 +2,7 @@
 {application, emqx_rule_engine, [
     {description, "EMQX Rule Engine"},
     % strict semver, bump manually!
-    {vsn, "5.0.16"},
+    {vsn, "5.0.17"},
     {modules, []},
     {registered, [emqx_rule_engine_sup, emqx_rule_engine]},
     {applications, [kernel, stdlib, rulesql, getopt, emqx_ctl]},

+ 11 - 0
changes/ce/fix-10728.en.md

@@ -0,0 +1,11 @@
+Fixed an issue where the rule engine was unable to access variables exported by `FOREACH` in the `DO` clause. 
+
+  Given a payload: `{"date": "2023-05-06", "array": ["a"]}`, as well as the following SQL statement:
+  ```
+  FOREACH payload.date as date, payload.array as elem
+  DO date, elem
+  FROM "t/#"
+  ```
+  Prior to the fix, the `date` variable exported by `FOREACH` could not be accessed in the `DO` clause of the above SQL, resulting in the following output for the SQL statement:
+  `[{"elem": "a","date": "undefined"}]`.
+  After the fix, the output of the SQL statement is: `[{"elem": "a","date": "2023-05-06"}]`