Quellcode durchsuchen

Results with nested records not deserialized

Thor could core when saving a result that contains nested child records,
as the result was not properly deserialized before calling helper->sendResult().

Copied the code from aggregate case which seems to handle it correctly.

Fixes EE issue hpcc-systems/LN#399

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman vor 13 Jahren
Ursprung
Commit
ad7391481d
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5 1
      thorlcr/activities/result/thresult.cpp

+ 5 - 1
thorlcr/activities/result/thresult.cpp

@@ -63,8 +63,12 @@ public:
             {
                 if (results)
                     throw MakeThorException(TE_UnexpectedMultipleSlaveResults, "Received greater than one result from slaves");
-                const void *result = (const void *)mb.readDirect(sz);
                 IHThorRemoteResultArg *helper = (IHThorRemoteResultArg *)queryHelper();
+                Owned<IRowInterfaces> resultRowIf = createRowInterfaces(helper->queryOutputMeta(), queryActivityId(), queryCodeContext());
+                CThorStreamDeserializerSource mds(sz, mb.readDirect(sz));
+                RtlDynamicRowBuilder rowBuilder(resultRowIf->queryRowAllocator());
+                size32_t sz = resultRowIf->queryRowDeserializer()->deserialize(rowBuilder, mds);
+                OwnedConstThorRow result = rowBuilder.finalizeRowClear(sz);
                 helper->sendResult(result);
                 results = true;
             }