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

[#2083] feat(core): Add JDBC backend operations for table #2384

Merged
merged 54 commits into from
Mar 5, 2024

Conversation

xloya
Copy link
Contributor

@xloya xloya commented Feb 28, 2024

What changes were proposed in this pull request?

The purpose of this PR is to implement JDBC backend operation for Table metadata. Depend on #2377 . Metadata operations of Fileset will be supported in the remaining PRs.

Why are the changes needed?

Fix: #2083

How was this patch tested?

Add unit tests to test the table metadata ops.

@xloya xloya force-pushed the add-ops-for-table branch from 20c00ad to 5061ed8 Compare February 29, 2024 03:35
@xloya xloya force-pushed the add-ops-for-table branch from 5061ed8 to 841bc01 Compare March 1, 2024 01:38
@xloya xloya force-pushed the add-ops-for-table branch from 841bc01 to 385128b Compare March 1, 2024 07:26
@xloya
Copy link
Contributor Author

xloya commented Mar 4, 2024

@yuqi1129 @jerryshao @qqqttt123 This PR is ready for reviews, please take a look when you have time, thanks!

KEY `idx_mid` (`metalake_id`),
KEY `idx_cid` (`catalog_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'table metadata';
Copy link
Contributor

Choose a reason for hiding this comment

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

I remembered that for table metadata, you will have another "version" table, am I right or will you do it in another PR?

Copy link
Contributor Author

@xloya xloya Mar 4, 2024

Choose a reason for hiding this comment

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

There is no need to create a version table for the properties that TableEntity currently contains, so I did not create a version table in this PR. If TableEntity needs to add more properties and maintain multiple versions in the future, we can create the version table separately. For FilesetEntity I will create a version table in the init PR, because it has properties such as Comment, Properties and StorageLocation that require multi-version management.
This is the current properties of TableEntity:
image
And this is the current properties of FilesetEntity:
image

@jerryshao
Copy link
Contributor

@yuqi1129 @qqqttt123 would you please help to review this when you have time?

} else {
throw new IOException("Failed to update the entity: " + identifier);
}
}
Copy link
Contributor

@jerryshao jerryshao Mar 5, 2024

Choose a reason for hiding this comment

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

IIUC this update operation seems not transactional, but it's fine as we have locks in the outside.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I learned that the current plan is to implement locks in the upper layer, because backends without transaction capabilities may be supported, so more complex locks are not implemented here.

Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

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

Overall LGTM, @yuqi1129 @qqqttt123 please take time to review this.

@jerryshao jerryshao requested review from yuqi1129 and qqqttt123 March 5, 2024 04:03
@jerryshao jerryshao merged commit 49bacdf into apache:main Mar 5, 2024
12 checks passed
jerryshao pushed a commit that referenced this pull request Mar 7, 2024
### What changes were proposed in this pull request?

The purpose of this PR is to implement JDBC backend operation for
Fileset metadata. Depend on #2384.

### Why are the changes needed?

Fix: #2084 

### How was this patch tested?

Add unit tests to test the fileset metadata ops.

---------

Co-authored-by: xiaojiebao <[email protected]>
@xloya xloya deleted the add-ops-for-table branch June 20, 2024 01:42
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.

[Subtask] Add JDBC Backend ops for Table
3 participants