-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix property graph case-sentisitivity #188
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#pragma once | ||
|
||
#include "duckpgq/common.hpp" | ||
#include "duckdb/common/case_insensitive_map.hpp" | ||
|
||
#include <duckpgq/core/utils/compressed_sparse_row.hpp> | ||
|
||
|
@@ -33,7 +34,7 @@ class DuckPGQState : public ClientContextState { | |
// unnamed graph tables | ||
|
||
//! Property graphs that are registered | ||
std::unordered_map<string, unique_ptr<CreateInfo>> registered_property_graphs; | ||
case_insensitive_map_t<unique_ptr<CreateInfo>> registered_property_graphs; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only change, all others are made by linters via |
||
|
||
//! Used to build the CSR data structures required for path-finding queries | ||
std::unordered_map<int32_t, unique_ptr<duckpgq::core::CSR>> csr_list; | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -51,6 +51,24 @@ EDGE TABLES ( | |||||
PROPERTIES ( createDate ) LABEL Knows | ||||||
) | ||||||
|
||||||
query I | ||||||
-SELECT count(id) | ||||||
FROM | ||||||
GRAPH_TABLE (PG | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The property graph created at L43 is of lower case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to double check, could you change the test to verify it has the right result? Instead of only checking that the query doesn't crash :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated the PR description to reflect the manual test result, which looks ok to me. Let me check how to leverage the testing framework to verify the output as well. duckpgq-extension/test/sql/get_csr_ptr.test Lines 59 to 60 in f49246d
Let me check and get back to you. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! PTAL, thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! LGTM |
||||||
MATCH p = (s1:Person)-[k:Knows]->(s2:Person WHERE s2.name='Daniel') | ||||||
COLUMNS (s1.id)); | ||||||
---- | ||||||
0 | ||||||
|
||||||
query I | ||||||
-SELECT count(id) | ||||||
FROM | ||||||
GRAPH_TABLE (PG | ||||||
MATCH p = (s1:Person)-[k:Knows]->(s2:Person WHERE s2.name='Peter') | ||||||
COLUMNS (s1.id)); | ||||||
---- | ||||||
3 | ||||||
|
||||||
# Error as property graph pg already exists | ||||||
statement error | ||||||
-CREATE PROPERTY GRAPH pg | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reserve memory before emplace.