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

fix IMPORT_DATABASE path #3063

Merged
merged 1 commit into from
Mar 22, 2024
Merged

fix IMPORT_DATABASE path #3063

merged 1 commit into from
Mar 22, 2024

Conversation

hououou
Copy link
Collaborator

@hououou hououou commented Mar 15, 2024

When we execute the export database statement "export database 'path1' ", we will export data in a directory 'path1', along with csv cyphers, data cyphers, and macro cyphers for import database later. The copy statement is just like copy xx from path1/tablename. Assume we move this exported data directory to other directories, or to other platforms, and then want to import it with import database 'path2'. Then the path1 in copy statement is not correct. This PR is to replace the path in copy statements with path2, i.e., the bounded import file path.

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.90%. Comparing base (8f37501) to head (73949ed).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3063   +/-   ##
=======================================
  Coverage   91.89%   91.90%           
=======================================
  Files        1169     1169           
  Lines       43759    43764    +5     
=======================================
+ Hits        40214    40220    +6     
+ Misses       3545     3544    -1     

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

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.

I'm assuming this PR is to fix a bug. But I don't see a test reproducing that bug.

src/include/common/file_system/file_system.h Outdated Show resolved Hide resolved
src/include/common/file_system/file_system.h Outdated Show resolved Hide resolved
src/include/common/file_system/file_system.h Outdated Show resolved Hide resolved
src/binder/bind/bind_import_database.cpp Show resolved Hide resolved
@hououou hououou force-pushed the import_path_fix branch 3 times, most recently from 02f8798 to 5bd546e Compare March 21, 2024 21:20
Copy link
Collaborator

@acquamarin acquamarin left a comment

Choose a reason for hiding this comment

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

As we discussed, we should parse the csvOptions when exporting. If the csvOptions have special characters, we should escape/quote

src/binder/bind/bind_import_database.cpp Outdated Show resolved Hide resolved
src/binder/bind/bind_import_database.cpp Show resolved Hide resolved
src/processor/operator/persistent/export_db.cpp Outdated Show resolved Hide resolved
@hououou hououou merged commit 9247fd2 into master Mar 22, 2024
17 checks passed
@hououou hououou deleted the import_path_fix branch March 22, 2024 21:22
ray6080 pushed a commit that referenced this pull request Mar 23, 2024
fix import database path
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

3 participants