Explorar o código

HPCC-21795 Fix assert(match) error in hqliproj.cpp

Ensure implicit field project has consistent row field instances. The
problem could occur when two datasets had nested records that were
compatible but not identical (e.g., different attributes defined them).

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday %!s(int64=6) %!d(string=hai) anos
pai
achega
5e6bab415e
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      ecl/hqlcpp/hqliproj.cpp

+ 6 - 1
ecl/hqlcpp/hqliproj.cpp

@@ -294,7 +294,12 @@ IHqlExpression * UsedFieldSet::createFilteredAssign(IHqlExpression * field, IHql
     if (field->isDatarow())
     {
         NestedField * match = findNested(field);
-        assertex(match);
+        if (!match)
+        {
+            match = findNestedByName(field);
+            assertex(match);
+            newField.set(match->field);
+        }
         NestedField * exception = exceptions ? exceptions->findNested(field) : NULL;
         if (!match->isEmpty())
         {