Skip to content

Commit 613c0f5

Browse files
authored
test(f24-p3): modify mock graph table (#765)
1 parent 719e735 commit 613c0f5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/execution/mock_scan_executor.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,11 @@ auto GetMockTableSchemaOf(const std::string &table) -> Schema {
125125
}
126126

127127
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.
128131
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},
130133
Column{"distance", TypeId::INTEGER}}};
131134
}
132135

@@ -433,8 +436,9 @@ auto GetFunctionOf(const MockScanPlanNode *plan) -> std::function<Tuple(size_t)>
433436
int dst = cursor / GRAPH_NODE_CNT;
434437
values.push_back(ValueFactory::GetIntegerValue(src));
435438
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));
438442
if (src == dst) {
439443
values.push_back(ValueFactory::GetNullValueByType(TypeId::INTEGER));
440444
} else {

0 commit comments

Comments
 (0)