Skip to content
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

There is only one type of subgraph that can be generated. #12

Open
Wh1mSY opened this issue Feb 20, 2023 · 2 comments
Open

There is only one type of subgraph that can be generated. #12

Wh1mSY opened this issue Feb 20, 2023 · 2 comments

Comments

@Wh1mSY
Copy link

Wh1mSY commented Feb 20, 2023

Hello, I encountered an issue while using your method. When there are multiple possible subgraph matching methods, only one result is outputted. May I ask how to view all possible matching results? Below is the test data and output results that I used.
datagraph:
t 5 4
v 0 0 4
v 1 1 1
v 2 2 1
v 3 1 1
v 4 2 1
e 0 1
e 0 2
e 0 3
e 0 4
querygraph
t 3 2
v 0 0 2
v 1 1 1
v 2 2 1
e 0 1
e 0 2

Command Line:
Data Graph CSR:
Data Graph: ../../test/sample_dataset/test_case_1.graph
Query Graph: ../../test/sample_dataset/query1_positive.graph
Filter Type: GQL
Order Type: RI
Engine Type: LFTJ
Output Limit: 100000-filter
Time Limit (seconds): 60
Order Num: 100
Distribution File Path: temp.distribution

Load graphs...

Query Graph Meta Information
|V|: 3, |E|: 2, |Σ|: 3
Max Degree: 2, Max Label Frequency: 1

|V|: 5, |E|: 4, |Σ|: 3
Max Degree: 4, Max Label Frequency: 2

Start queries...

Filter candidates...

Build indices...
Index Info: CoreTable(0), TreeTable(0), LeafTable(2)
LeafTable 0-1: 2
LeafTable 0-2: 2
Total Cardinality: 4.0

Generate a matching order...
Query Plan: 0 1 2

Enumerate...

Release memories...

Load graphs time (seconds): 0.0067
Filter vertices time (seconds): 0.0000
Build table time (seconds): 0.0000
Generate query plan time (seconds): 0.0000
Enumerate time (seconds): 0.0000
Preprocessing time (seconds): 0.0001
Total time (seconds): 0.0001
Memory cost (MB): 0.0001
#Embeddings: 4
Call Count: 3
Per Call Count Time (nanoseconds): 3586.6667
End.

@shixuansun
Copy link
Member

Sorry for the late reply. I just notice the issue when I check the repository.

You need to add some code to dump the results. For example, if you use the LFTJ enumeration method in EvaluateQuery.cpp, you can output the result by adding a for loop at line 342 as follows:

for (uint32_t x = 0; x < max_depth; ++x) {
std::cout << embedding[x] << ' ';
}
std::cout << '\n';

If you use other enumeration methods, you can output the results with the same method by simply finding the place where embedding_cnt is updated. The array embedding stores the result.

Note that (1) embedding[x] is the data vertex mapped to order[x], and (2) there can be a huge number of results.

@shixuansun
Copy link
Member

By the way, in your example, there are 4 matching results as indicated by "#Embeddings" in the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants