-
Notifications
You must be signed in to change notification settings - Fork 15
Synchronize TypeDB3 and Neo #170
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
base: development
Are you sure you want to change the base?
Synchronize TypeDB3 and Neo #170
Conversation
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.
Pull Request Overview
This PR synchronizes TypeDB3 and Neo4j benchmarks by adding explicit warehouse-district relationships in TypeDB3 queries to match Neo4j's query pattern, ensuring fair performance comparison.
- Adds TLS configuration option (disabled) for TypeDB driver
- Introduces explicit warehouse-district link constraints in all TPCC transaction queries
- Modifies 8 query locations to include warehouse context when accessing districts
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
q = f""" | ||
match | ||
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}; | ||
$w isa WAREHOUSE, has W_ID { w_id }; |
Copilot
AI
Sep 25, 2025
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.
[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.
Copilot uses AI. Check for mistakes.
q = f""" | ||
match | ||
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}; | ||
$w isa WAREHOUSE, has W_ID { w_id }; |
Copilot
AI
Sep 25, 2025
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.
[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.
Copilot uses AI. Check for mistakes.
q = f""" | ||
match | ||
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}; | ||
$w isa WAREHOUSE, has W_ID { w_id }; |
Copilot
AI
Sep 25, 2025
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.
[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.
Copilot uses AI. Check for mistakes.
q = f""" | ||
match | ||
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}; | ||
$w isa WAREHOUSE, has W_ID { w_id }; |
Copilot
AI
Sep 25, 2025
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.
[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.
Copilot uses AI. Check for mistakes.
q = f""" | ||
match | ||
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}, | ||
$w isa WAREHOUSE, has W_ID { w_id }; |
Copilot
AI
Sep 25, 2025
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.
[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.
Copilot uses AI. Check for mistakes.
q = f""" | ||
match | ||
$d isa DISTRICT, has D_ID {w_id * DPW + d_id}, has D_NEXT_O_ID $d_next_o_id; | ||
$w isa WAREHOUSE, has W_ID { w_id }; |
Copilot
AI
Sep 25, 2025
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.
[nitpick] Inconsistent spacing around the variable in the query. The space after the opening brace and before the closing brace should be removed to match the formatting used elsewhere in the file.
Copilot uses AI. Check for mistakes.
I'd also add the ID computation we do into Neo just to make it exactly equal |
What is the goal of this PR?
We notice that Neo4j does an extra hop between warehouses and districts most of the time, which we add into TypeDB to make the comparison fairer. Note: this workaround came from the fact that TypeDB doesn't composite keys yet.