Sfoglia il codice sorgente

Merge pull request #9683 from ghalliday/issue17202

HPCC-17202 Improve code for short const sets of variable length strings

Reviewed-By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 anni fa
parent
commit
bc5a07c6c8
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      ecl/hqlcpp/hqlcpp.cpp

+ 2 - 1
ecl/hqlcpp/hqlcpp.cpp

@@ -7873,7 +7873,8 @@ void HqlCppTranslator::doBuildAssignList(BuildCtx & ctx, const CHqlBoundTarget &
 
     //This is an assignment, a non-constant set would end up creating two temporaries.
     unsigned numItems = expr->numChildren();
-    if (((numItems > 0) && (numItems < 3)) || isComplexSet(expr) || !isConstantSet(expr))
+    ITypeInfo * elementType = type->queryChildType();
+    if (((numItems > 0) && (numItems < 3) && !isUnknownSize(elementType)) || isComplexSet(expr) || !isConstantSet(expr))
     {
         Owned<IHqlCppSetBuilder> builder = createTempSetBuilder(target.queryType()->queryChildType(), target.isAll);
         builder->buildDeclare(ctx);