Browse Source

HPCC-11838 Don't hoist expressions from within SIZEOF()

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 11 years ago
parent
commit
72075ca5fd
2 changed files with 4 additions and 0 deletions
  1. 3 0
      ecl/hqlcpp/hqlhtcpp.cpp
  2. 1 0
      ecl/hqlcpp/hqlttcpp.cpp

+ 3 - 0
ecl/hqlcpp/hqlhtcpp.cpp

@@ -330,6 +330,9 @@ public:
     void markHoistPoints(IHqlExpression * expr)
     {
         node_operator op = expr->getOperator();
+        if (op == no_sizeof)
+            return;
+
         if (expr->isDataset() || (expr->isDatarow() && (op != no_select)))
         {
             if (!translator.canAssignInline(&ctx, expr))

+ 1 - 0
ecl/hqlcpp/hqlttcpp.cpp

@@ -7934,6 +7934,7 @@ void AutoScopeMigrateTransformer::doAnalyseExpr(IHqlExpression * expr)
     case no_allnodes:
     case no_keyedlimit:
     case no_nothor:
+    case no_sizeof:
         return;
     case no_sequential:
         return;