瀏覽代碼

Merge pull request #5983 from ghalliday/issue11542b

HPCC-11542 Ensure expressions in action lists are actions.

Reviewed-By: Jamie Noss <james.noss@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 年之前
父節點
當前提交
a9cb37d3ec
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      ecl/hqlcpp/hqlttcpp.cpp

+ 21 - 0
ecl/hqlcpp/hqlttcpp.cpp

@@ -1374,6 +1374,27 @@ IHqlExpression * SequenceNumberAllocator::createTransformed(IHqlExpression * exp
             translator.WARNINGAT(CategoryUnexpected, expr, HQLERR_ScalarOutputWithinApply);
         }
         break;
+    case no_parallel:
+    case no_sequential:
+    case no_orderedactionlist:
+        {
+            HqlExprArray args;
+            ForEachChild(i, expr)
+            {
+                OwnedHqlExpr next = transform(expr->queryChild(i));
+                if (!next->isAction())
+                {
+                    if (!next->isConstant())
+                        next.setown(createValue(no_evaluate_stmt, makeVoidType(), next.getClear()));
+                    else
+                        next.clear();
+                }
+
+                if (next)
+                    args.append(*next.getClear());
+            }
+            return expr->clone(args);
+        }
     }
     Owned<IHqlExpression> transformed = NewHqlTransformer::createTransformed(expr);
     return attachSequenceNumber(transformed.get());