Skip to content

Commit

Permalink
Update test, get correct catalog, updating match
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Nov 8, 2024
1 parent 6f60830 commit 6b9a762
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/include/duckdb/parser/property_graph_table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#pragma once

#include "duckdb/common/vector.hpp"
#include <duckdb/parser/tableref/basetableref.hpp>

namespace duckdb {

Expand Down Expand Up @@ -71,10 +72,18 @@ class PropertyGraphTable {

static shared_ptr<PropertyGraphTable> Deserialize(Deserializer &deserializer);

bool hasTableNameAlias() {
bool hasTableNameAlias() const {
return !table_name_alias.empty();
}

unique_ptr<BaseTableRef> CreateBaseTableRef() const {
auto base_table_ref = make_uniq<BaseTableRef>();
base_table_ref->catalog_name = catalog_name;
base_table_ref->schema_name = schema_name;
base_table_ref->table_name = table_name;
return base_table_ref;
}

string ToLower(const std::string &str);

bool IsSourceTable(const string &table_name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ Transformer::TransformPropertyGraphTable(duckdb_libpgquery::PGPropertyGraphTable
}

auto pg_table = make_shared_ptr<PropertyGraphTable>(transformed_name.name,
table_name_alias, column_names, label_names, transformed_name.catalog, transformed_name.schema);
table_name_alias, column_names, label_names);

if (!transformed_name.schema.empty()) {
pg_table->catalog_name = transformed_name.catalog.empty() ? transformed_name.schema : transformed_name.catalog;
if (!transformed_name.catalog.empty()) {
pg_table->schema_name = transformed_name.schema;
}
}
pg_table->is_vertex_table = graph_table->is_vertex_table;
pg_table->except_columns = std::move(except_list);
pg_table->all_columns = all_columns;
Expand Down

0 comments on commit 6b9a762

Please sign in to comment.