-
Notifications
You must be signed in to change notification settings - Fork 125
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
Implement of Directory table #390
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wenchaozhang-123
force-pushed
the
directory_table
branch
12 times, most recently
from
March 19, 2024 06:49
a5439d5
to
37c68d8
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
from
March 25, 2024 11:30
f03f879
to
22e2ad6
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
2 times, most recently
from
March 26, 2024 09:49
c330a04
to
129654f
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
2 times, most recently
from
March 28, 2024 10:17
5d4c849
to
8c65b3a
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
from
April 1, 2024 10:22
d4b0304
to
e807076
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
from
April 2, 2024 01:54
4a9c161
to
bd9f56b
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
14 times, most recently
from
April 23, 2024 10:49
cdf0f6c
to
086e3c6
Compare
wenchaozhang-123
force-pushed
the
directory_table
branch
9 times, most recently
from
April 24, 2024 10:28
90cfc0d
to
64faf50
Compare
Implement directory table feature in this commit. Directory table is a new relation which used to organize the unstructured data files in the specified tablespace. The date files are stored in the specified tablespace while the tuples recorded the metadata of the data files such as relative_path, md5 size etc. are stored in normal table. We support local directory table and remote directory table meanwhile. The local directory table uses the local tablespace while the remote directory table uses the DFS tablespace which implemented in our enterprise extension. We support copy binary from to upload file to directory table, directory_table UDF to get file content, remove_file UDF to remove file from directory table. What's more, we implement a tool called cbload used to upload file to direcotry table. Meanwhile, to support DFS directory table, we also import some catalog tables such as gp_storage_server, gp_storage_user_mapping which are shared in all databases. We will illustrage some examples for your convinence of usage as follow. -- Create an oss_server that points to endpoint: CREATE STORAGE SERVER oss_server OPTIONS (protocol 'qingstor', endpoint 'pek3b.qingstor.com', https 'true', virtual_host 'false'); -- Create a user mapping to access oss_server CREATE STORAGE USER MAPPING FOR CURRENT_USER STORAGE SERVER oss_server OPTIONS (accesskey 'KGCPPHVCHRDSYFEAWLLC', secretkey '0SJIWiIATh6jOlmAas23q6hOAGBI1BnsnvgJmTs'); -- Create a local tablespace CREATE TABLESPACE dirtable_spc location '/data/dirtable_spc'; -- Create a local directory table CREATE DIRECTORY TABLE dirtable TABLESPACE dirtable_spc; -- Copy binary from directory table COPY BINARY dirtable FROM '/data/file1.csv' 'file1'; -- Select directory table SELECT * FROM dirtable; SELECT * FROM directory_table('dirtable'); -- Remove file from directory table SELECT remove_file('dirtable', 'file1'); Co-authored-by: Mu Guoqing muguoqing@hashdata.cn Reviewd-by: Yang Yu yangyu@hashdata.cn Yang Jianghua yjhjstz@gmail.com
wenchaozhang-123
force-pushed
the
directory_table
branch
from
April 24, 2024 10:31
64faf50
to
3229c65
Compare
my-ship-it
approved these changes
Apr 24, 2024
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #ISSUE_Number
Change logs
Describe your change clearly, including what problem is being solved or what feature is being added.
If it has some breaking backward or forward compatibility, please clary.
Why are the changes needed?
Describe why the changes are necessary.
Does this PR introduce any user-facing change?
If yes, please clarify the previous behavior and the change this PR proposes.
How was this patch tested?
Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.
Contributor's Checklist
Here are some reminders and checklists before/when submitting your pull request, please check them:
make installcheck
make -C src/test installcheck-cbdb-parallel
cloudberrydb/dev
team for review and approval when your PR is ready🥳