소스 검색

Merge pull request #4495 from ghalliday/issue9442

HPCC-9442 Avoid ensureCapacity call on fixed size disk read

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 년 전
부모
커밋
102f90c850
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      ecl/hqlcpp/hqlsource.cpp

+ 7 - 4
ecl/hqlcpp/hqlsource.cpp

@@ -1290,10 +1290,13 @@ void SourceBuilder::buildTransformElements(BuildCtx & ctx, IHqlExpression * expr
                 }
             }
 
-            OwnedHqlExpr ensureSize = adjustValue(bound.expr, virtualSize);
-            s.clear().append("crSelf.ensureCapacity(");
-            translator.generateExprCpp(s, ensureSize).append(", NULL);");
-            ctx.addQuoted(s);
+            if (!isFixedSizeRecord(record))
+            {
+                OwnedHqlExpr ensureSize = adjustValue(bound.expr, virtualSize);
+                s.clear().append("crSelf.ensureCapacity(");
+                translator.generateExprCpp(s, ensureSize).append(", NULL);");
+                ctx.addQuoted(s);
+            }
 
             s.clear().append("memcpy(crSelf.row(), left, ");
             translator.generateExprCpp(s, bound.expr).append(");");