Просмотр исходного кода

Merge pull request #1636 from richardkchapman/thor-result-deserialize

Results with nested records not deserialized

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 13 лет назад
Родитель
Сommit
a2c8db0367
1 измененных файлов с 5 добавлено и 1 удалено
  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;
             }