Skip to content

Commit

Permalink
Leave vectors empty instead of inserting string
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Sep 6, 2024
1 parent 342af0b commit 179b0bf
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,36 +105,27 @@ Transformer::TransformPropertyGraphTable(duckdb_libpgquery::PGPropertyGraphTable
auto key = reinterpret_cast<duckdb_libpgquery::PGValue *>(src_key->data.ptr_value);
pg_table->source_pk.emplace_back(key->val.str);
}
} else {
pg_table->source_pk.emplace_back(string());
}

if (graph_table->dst_pk) {
for (auto &dst_key = graph_table->dst_pk->head; dst_key != nullptr; dst_key = lnext(dst_key)) {
auto key = reinterpret_cast<duckdb_libpgquery::PGValue *>(dst_key->data.ptr_value);
pg_table->destination_pk.emplace_back(key->val.str);
}
} else {
pg_table->destination_pk.emplace_back(string());
}


if (graph_table->src_fk) {
for (auto &src_key = graph_table->src_fk->head; src_key != nullptr; src_key = lnext(src_key)) {
auto key = reinterpret_cast<duckdb_libpgquery::PGValue *>(src_key->data.ptr_value);
pg_table->source_fk.emplace_back(key->val.str);
}
} else {
pg_table->source_fk.emplace_back(string());
}

if (graph_table->dst_fk) {
for (auto &dst_key = graph_table->dst_fk->head; dst_key != nullptr; dst_key = lnext(dst_key)) {
auto key = reinterpret_cast<duckdb_libpgquery::PGValue *>(dst_key->data.ptr_value);
pg_table->destination_fk.emplace_back(key->val.str);
}
} else {
pg_table->destination_fk.emplace_back(string());
}
}
return pg_table;
Expand Down

0 comments on commit 179b0bf

Please sign in to comment.