@@ -125,8 +125,11 @@ auto GetMockTableSchemaOf(const std::string &table) -> Schema {
125
125
}
126
126
127
127
if (table == " __mock_graph" ) {
128
+ // Note(f24): Make `src_label` and `dst_label` INTEGER because the current external merge sort implementation
129
+ // only supports sorting on fixed-length data. Should be VARCHAR(8) if var-length data sorting is supported in
130
+ // the future.
128
131
return Schema{std::vector{Column{" src" , TypeId::INTEGER}, Column{" dst" , TypeId::INTEGER},
129
- Column{" src_label" , TypeId::VARCHAR, 8 }, Column{" dst_label" , TypeId::VARCHAR, 8 },
132
+ Column{" src_label" , TypeId::INTEGER }, Column{" dst_label" , TypeId::INTEGER },
130
133
Column{" distance" , TypeId::INTEGER}}};
131
134
}
132
135
@@ -433,8 +436,9 @@ auto GetFunctionOf(const MockScanPlanNode *plan) -> std::function<Tuple(size_t)>
433
436
int dst = cursor / GRAPH_NODE_CNT;
434
437
values.push_back (ValueFactory::GetIntegerValue (src));
435
438
values.push_back (ValueFactory::GetIntegerValue (dst));
436
- values.push_back (ValueFactory::GetVarcharValue (fmt::format (" {:03}" , src)));
437
- values.push_back (ValueFactory::GetVarcharValue (fmt::format (" {:03}" , dst)));
439
+ // Note(f24): Use INTEGER for `src_label` and `dst_label` based on current external merge sort.
440
+ values.push_back (ValueFactory::GetIntegerValue (src * 100 ));
441
+ values.push_back (ValueFactory::GetIntegerValue (dst * 100 ));
438
442
if (src == dst) {
439
443
values.push_back (ValueFactory::GetNullValueByType (TypeId::INTEGER));
440
444
} else {
0 commit comments