浏览代码

HPCC-19977 Create correct output type for index count

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith 7 年之前
父节点
当前提交
694a0e4b64
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      common/remote/sockfile.cpp

+ 8 - 2
common/remote/sockfile.cpp

@@ -4345,6 +4345,12 @@ IRemoteActivity *createRemoteIndexRead(IPropertyTree &actNode)
 }
 
 
+// create a { unsigned8 } output meta for the count
+static const RtlIntTypeInfo indexCountFieldType(type_unsigned|type_int, 8);
+static const RtlFieldStrInfo indexCountField("count", nullptr, &indexCountFieldType);
+static const RtlFieldInfo * const indexCountFields[2] = { &indexCountField, nullptr };
+static const RtlRecordTypeInfo indexCountRecord(type_record, 2, indexCountFields);
+
 class CRemoteIndexCountActivity : public CRemoteIndexBaseActivity
 {
     typedef CRemoteIndexBaseActivity PARENT;
@@ -4356,9 +4362,9 @@ public:
     {
         rowLimit = config.getPropInt64("chooseN");
 
-        // create helper
         inMeta.setown(getTypeInfoOutputMetaData(config, "input", false));
-        outMeta.set(inMeta);
+        outMeta.setown(new CDynamicOutputMetaData(indexCountRecord));
+
         initCommon(config);
     }
 // IRemoteActivity impl.