Browse Source

Merge remote-tracking branch 'origin/candidate-3.10.x'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
a761162791

+ 10 - 2
ecl/hqlcpp/hqlcppds.cpp

@@ -3338,9 +3338,15 @@ BoundRow * HqlCppTranslator::buildDatasetIterateSpecialTempTable(BuildCtx & ctx,
 {
     IHqlExpression * values = expr->queryChild(0);
     bool requiresTempRow = false;
-    ITypeInfo * type = values->queryType()->queryChildType();
+    ITypeInfo * setType = values->queryType();
+    ITypeInfo * type = setType->queryChildType();
     switch (type->getTypeCode())
     {
+    case type_int:
+        requiresTempRow = isComplexSet(setType, false);
+        break;
+    case type_swapint:
+    case type_packedint:
     case type_alien:
     case type_bitfield:
         requiresTempRow = true;
@@ -3355,9 +3361,10 @@ BoundRow * HqlCppTranslator::buildDatasetIterateSpecialTempTable(BuildCtx & ctx,
     CHqlBoundExpr boundCurElement;
     cursor->buildIterateLoop(ctx, boundCurElement, false);
 
-    OwnedHqlExpr address = getPointer(boundCurElement.expr);
     if (requiresTempRow)
     {
+        //MORE: This could probably be improved by having a variety of buildIterateLoop which returned the
+        //underlying bound row.  However it occurs fairly infrequently, so not a priority.
         Owned<BoundRow> tempRow = declareTempAnonRow(ctx, ctx, expr);
         Owned<BoundRow> rowBuilder = createRowBuilder(ctx, tempRow);
 
@@ -3372,6 +3379,7 @@ BoundRow * HqlCppTranslator::buildDatasetIterateSpecialTempTable(BuildCtx & ctx,
     else
     {
         assertex(!boundCurElement.length && !boundCurElement.count);
+        OwnedHqlExpr address = getPointer(boundCurElement.expr);
         address.setown(createValue(no_implicitcast, makeRowReferenceType(expr), LINK(address)));
         return bindTableCursor(ctx, expr, address);
     }

+ 36 - 0
ecl/regress/addressint.ecl

@@ -0,0 +1,36 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+set of unsigned6  in_set := [   ] : stored('InputID');
+
+layout := record
+    string20	 	acctno := '';
+    UNSIGNED6 ValID := '';	
+    string1	 ValSrc := '';	
+end;
+
+layout_did := record
+	unsigned6 id:=0;
+end;
+
+
+dsSet := if(exists(in_set),
+            project(dataset(in_set,layout_did),
+                    transform(layout, self.acctno := '1';self.ValId:=left.id;self.ValSRC:='S';self:=[])));
+
+nothor(output(dsSet));
+

+ 1 - 1
initfiles/componentfiles/configxml/@temp/esp_service.xsl

@@ -1160,7 +1160,7 @@ xmlns:seisint="http://seisint.com"  xmlns:set="http://exslt.org/sets" exclude-re
         <xsl:param name="path"/>
         <xsl:if test="contains($path, '\')">
             <xsl:variable name="prefix" select="substring-before($path, '\')"/>
-            <xsl:value-of select="concat($prefix, '\')"/>
+            <xsl:value-of select="concat($prefix, '/')"/>
             <xsl:call-template name="GetPathName">
                 <xsl:with-param name="path" select="substring-after($path, '\')"/>
             </xsl:call-template>