浏览代码

Merge pull request #8139 from ghalliday/issue14811

HPCC-14811 Avoid duplicating annotations on expressions

Reviewed-By: Jamie Noss <james.noss@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 年之前
父节点
当前提交
063f3eec9a
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      ecl/hql/hqlexpr.cpp

+ 4 - 1
ecl/hql/hqlexpr.cpp

@@ -8809,7 +8809,10 @@ public:
             if (expr->queryChild(1) == searchModule)
             {
                 IIdAtom * id = expr->queryChild(3)->queryId();
-                return getVirtualReplacement(id);
+                OwnedHqlExpr replacement = getVirtualReplacement(id);
+                if (expr == replacement->queryBody())
+                    return LINK(expr);
+                return replacement.getClear();
             }
             break;
         }