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

Import database #2964

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Import database #2964

merged 1 commit into from
Mar 1, 2024

Conversation

hououou
Copy link
Collaborator

@hououou hououou commented Feb 27, 2024

This PR is to add support for importing databases. We joint queries based on the schema.cypher, copy.cypher and macro.cypher(files created by export database), getting the query like "create node table xxx; create rel table xxx;copy from xxxx;". Then we execute the generated multiple query statements. Currently, due to we do not support DDL and copy statements in one transaction, each single query statement in generated multiple query statement has its own auto transaction. This should be refactored after we support DDL and Copy statements in one transaction.

@hououou hououou changed the base branch from master to apis_to_client_context February 28, 2024 14:31
Base automatically changed from apis_to_client_context to master February 28, 2024 14:35
Copy link
Contributor

@andyfengHKU andyfengHKU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also open an issue about removing ImportDB operator and instead reuse StandaloneCall operator and we make importDB as a pragma function

src/processor/operator/persistent/import_db.cpp Outdated Show resolved Hide resolved
src/parser/transform/transform_port_db.cpp Outdated Show resolved Hide resolved
src/binder/bind/bind_import_database.cpp Outdated Show resolved Hide resolved
src/binder/bind/bind_import_database.cpp Outdated Show resolved Hide resolved
src/include/main/client_context.h Outdated Show resolved Hide resolved
src/main/client_context.cpp Show resolved Hide resolved
src/main/client_context.cpp Outdated Show resolved Hide resolved
@hououou hououou marked this pull request as ready for review February 28, 2024 20:33
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 94.62366% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 93.52%. Comparing base (29f2534) to head (181f31f).
Report is 18 commits behind head on master.

Files Patch % Lines
src/main/client_context.cpp 78.94% 4 Missing ⚠️
src/planner/operator/logical_operator.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2964      +/-   ##
==========================================
+ Coverage   93.50%   93.52%   +0.02%     
==========================================
  Files        1121     1125       +4     
  Lines       42950    43081     +131     
==========================================
+ Hits        40161    40293     +132     
+ Misses       2789     2788       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hououou hououou merged commit 2fd56d7 into master Mar 1, 2024
15 checks passed
@hououou hououou deleted the importDB branch March 1, 2024 05:59
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

Successfully merging this pull request may close these issues.

None yet

2 participants