Skip to content

Commit

Permalink
Add more tests, make graph table name optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Feb 13, 2024
1 parent 5539a5f commit 41aca59
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/parser/transform/tableref/transform_match.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ unique_ptr<PathPattern> Transformer::TransformPath(duckdb_libpgquery::PGPathPatt
unique_ptr<TableRef> Transformer::TransformMatch(duckdb_libpgquery::PGMatchClause &root) {
auto match_info = make_uniq<MatchExpression>();
match_info->pg_name = root.pg_name; // Name of the property graph to bind to

auto alias = TransformQualifiedName(*root.graph_table);
match_info->alias = alias.name;
string alias_name;
if (root.graph_table) {
alias_name = TransformQualifiedName(*root.graph_table).name;
}
match_info->alias = alias_name.empty() ? "unnamed_graphtable" : alias_name;

if (root.where_clause) {
match_info->where_clause = TransformExpression(root.where_clause);
Expand Down

0 comments on commit 41aca59

Please sign in to comment.