Selaa lähdekoodia

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 6 vuotta sitten
vanhempi
commit
5e6bab415e
1 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  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())
         {