Sfoglia il codice sorgente

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 anni fa
parent
commit
5e6bab415e
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  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())
         {