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

Add TableMetadataService and utils #1772

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ypeckstadt
Copy link
Contributor

@ypeckstadt ypeckstadt commented May 26, 2024

Description

This PR adds a service and utils that deal with ScalarDB TableMetada. This service and utils will be used for both export and import processes.

Related issues and/or PRs

This PR depends on the following PRs and should be reviewed and merged after:

Changes made

  • Added the TableMetadataService
  • Added the TableMetadataUtils
  • Added the exceptions and error messages that are thrown in the service
  • Added unit tests

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

NA

Release notes

NA

@ypeckstadt ypeckstadt self-assigned this May 26, 2024
@ypeckstadt ypeckstadt added the enhancement New feature or request label May 26, 2024
* @param columnNames List of all column names in a table
* @return The field is metadata or not
*/
public static boolean isMetadataColumn(
Copy link
Collaborator

@brfrn169 brfrn169 May 29, 2024

Choose a reason for hiding this comment

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

We might be able to use ConsensusCommitUtils here. Could you please check it?

Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!
I just have a minor comment.

DATA_LOADER_INVALID_COLUMN_KEY_PARSING_FAILED(
Category.USER_ERROR, "0136", "Invalid key: Column %s does not exist in the table.", "", ""),
DATA_LOADER_INVALID_VALUE_KEY_PARSING_FAILED(
Category.USER_ERROR, "0137", "Parsing of key value %s failed. Details:%s.", "", ""),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Category.USER_ERROR, "0137", "Parsing of key value %s failed. Details:%s.", "", ""),
Category.USER_ERROR, "0137", "Parsing of key value %s failed. Details: %s.", "", ""),

@ypeckstadt
Copy link
Contributor Author

Converting to draft PR because, as Suzuki san mentioned, this PR might not be necessary.

@ypeckstadt ypeckstadt marked this pull request as draft July 4, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants