Pārlūkot izejas kodu

HPCC-25433 DataPatterns.Profile: Allow field names matching ECL keywords

Occurs specifically with numeric fields named after ECL keywords (e.g. 'row') and within the correlate functionality.

Signed-off-by: Dan S. Camper <dan.camper@lexisnexisrisk.com>
Dan S. Camper 4 gadi atpakaļ
vecāks
revīzija
e35239b553
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      ecllibrary/std/DataPatterns/Profile.ecl

+ 2 - 1
ecllibrary/std/DataPatterns/Profile.ecl

@@ -517,6 +517,7 @@ EXPORT Profile(inFile,
         // Pattern mapping a STRING datatype
         #UNIQUENAME(_MapAllStr);
         LOCAL STRING %_MapAllStr%(STRING s) := EMBED(C++)
+            #option pure;
             __lenResult = lenS;
             __result = static_cast<char*>(rtlMalloc(__lenResult));
 
@@ -1108,7 +1109,7 @@ EXPORT Profile(inFile,
                                     {
                                         %'fieldX'%,
                                         %'fieldY'%,
-                                        CORRELATION(_inFile, %fieldX%, %fieldY%)
+                                        CORRELATION(_inFile, _inFile.%fieldX%, _inFile.%fieldY%)
                                     }
                                     #SET(needsDelim, 1)