瀏覽代碼

Merge pull request #9831 from ghalliday/issue17019

HPCC-17019 Fix problem generating code for inline table inside allnodes

Reviewed-By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 年之前
父節點
當前提交
222e160c19
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      ecl/hqlcpp/hqlhtcpp.cpp

+ 6 - 3
ecl/hqlcpp/hqlhtcpp.cpp

@@ -17171,7 +17171,10 @@ ABoundActivity * HqlCppTranslator::doBuildActivityTempTable(BuildCtx & ctx, IHql
             normalized.setown(spotScalarCSE(normalized, NULL, queryOptions().spotCseInIfDatasetConditions));
 
         if (normalized->getOperator() == no_alias)
-            buildExpr(instance->startctx, normalized, bound);
+        {
+            buildExpr(funcctx, normalized, bound);
+            rowsExpr.setown(createValue(no_countlist, makeIntType(8, false), LINK(normalized)));
+        }
         else
         {
             BuildCtx * declarectx;
@@ -17183,9 +17186,9 @@ ABoundActivity * HqlCppTranslator::doBuildActivityTempTable(BuildCtx & ctx, IHql
             CHqlBoundTarget tempTarget;
             buildTempExpr(*callctx, *declarectx, tempTarget, normalized, FormatNatural, !canSetBeAll(normalized));
             bound.setFromTarget(tempTarget);
+            rowsExpr.setown(getBoundCount(bound));
+            rowsExpr.setown(createTranslated(rowsExpr));
         }
-        rowsExpr.setown(getBoundCount(bound));
-        rowsExpr.setown(createTranslated(rowsExpr));
 
         OwnedHqlExpr compare = createValue(no_ge, makeBoolType(), LINK(rowVar), ensureExprType(rowsExpr, rowVar->queryType()));
         BuildCtx condctx(funcctx);