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 direcotory table problems and add guc allow_dml_directory_table. #683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wenchaozhang-123
Copy link
Contributor

In this commit, fix gpdirtable can not specify file name. We can specify file name using two match mode, full match and regex match. Full match using for download one file while regex match using for downloading files in directory. What's more, we add new guc allow_dml_directory_table, which allow us to do dml on directory table's schema table. Lastly, we support a new grammar for drop directory table. We don't remove directory table's directory by default, while we can remove it by using 'with content' keywords in drop directory table grammar, for example:

DROP DIRECTORY TABLE dir_table WITH CONTENT;

Authored-by: Zhang Wenchao [email protected]

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 sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
  • Learn the coding contribution guide, including our code conventions, workflow and more.
  • List your communication in the GitHub Issues or Discussions (if has or needed).
  • Document changes.
  • Add tests for the change
  • Pass make installcheck
  • Pass make -C src/test installcheck-cbdb-parallel
  • Feel free to request cloudberrydb/dev team for review and approval when your PR is ready🥳

@wenchaozhang-123 wenchaozhang-123 force-pushed the fix_directory_table branch 5 times, most recently from 5871118 to 90b73e8 Compare October 24, 2024 08:56

if self.options.tag:
qry += "WHERE tag = \'%s\'" % self.options.tag
qry += ", tag = \'%s\'" % self.options.tag
Copy link
Contributor

Choose a reason for hiding this comment

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

The conditions should be joined by 'AND'. Do we have test cases for these options?

Copy link
Contributor Author

@wenchaozhang-123 wenchaozhang-123 Oct 28, 2024

Choose a reason for hiding this comment

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

Fixed, as this tools is independent from kernel, have not added test cases now.

In this commit, fix gpdirtable can not specify file name. We can specify
file name using two match mode, full match and regex match. Full match
using for download one file while regex match using for downloading files
in directory. What's more, we add new guc allow_dml_directory_table, which
allow us to do dml on directory table's schema table. Lastly, we support a
new grammar for drop directory table. We don't remove directory table's
directory by default, while we can remove it by using 'with content' keywords
in drop directory table grammar, for example:

DROP DIRECTORY TABLE dir_table WITH CONTENT;

Authored-by: Zhang Wenchao [email protected]
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.

2 participants