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

[#2349] improved(scripts): Add scripts directory for jdbc backend ddl scripts #2584

Merged
merged 8 commits into from
Apr 3, 2024

Conversation

xloya
Copy link
Contributor

@xloya xloya commented Mar 19, 2024

What changes were proposed in this pull request?

Add a separate scripts directory to save the ddl sql statements that jdbc backend needs to execute.
77d1a79a-faf8-4622-981a-74c3b50478db

Why are the changes needed?

Fix: #2349

@xloya
Copy link
Contributor Author

xloya commented Mar 27, 2024

@jerryshao Could you take a look of this? Thanks.

@xloya
Copy link
Contributor Author

xloya commented Mar 27, 2024

@yuqi1129 Please also take a look of this, thanks.

@@ -110,7 +110,7 @@ private void init(String type, Config config) {

private void prepareJdbcTable() {
// Read the ddl sql to create table
String scriptPath = "h2/h2-init.sql";
String scriptPath = "relational-entity-store/jdbc/h2/schema-0.5.0-h2.sql";
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the meaning of 0.5.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This refers to the next release version. We may add some ddl statements to the new version in the future. Users can execute initialization statements according to the access version. Referring to the implementation in Hive Metastore:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it.

@yuqi1129
Copy link
Contributor

yuqi1129 commented Mar 27, 2024

Additionally, it appears that we lack a mechanism to verify whether the configurations of relational entity store is well-configurated at the start. Only when we are about to operate metalakes, catalogs and so on can we confirm that everything is well. Is there a good way to verify it?

@xloya
Copy link
Contributor Author

xloya commented Mar 27, 2024

Additionally, it appears that we lack a mechanism to verify whether the configurations of relational entity store is well-configurated at the start. Only when we are about to operate metalakes, catalogs and so on can we confirm that everything is well. Is there a good way to verify it?

A simple way is that when we start the MySQL backend, we try to perform operations similar to select * from xxx limit 1; for each table. This can ensure that the database connection is normal and the corresponding table is created.

@xloya
Copy link
Contributor Author

xloya commented Apr 1, 2024

@jerryshao Could you take a look of this? Thanks.

@jerryshao
Copy link
Contributor

Maybe we don't need to have too many folders for script, "scripts/mysql/xxx" is enough, WDYT?

@xloya
Copy link
Contributor Author

xloya commented Apr 2, 2024

Maybe we don't need to have too many folders for script, "scripts/mysql/xxx" is enough, WDYT?

Sure, I don't have much preference for this.

@jerryshao
Copy link
Contributor

Maybe we don't need to have too many folders for script, "scripts/mysql/xxx" is enough, WDYT?

Sure, I don't have much preference for this.

Then let's do this.

@xloya
Copy link
Contributor Author

xloya commented Apr 2, 2024

Have changed like this:
image

@xloya xloya closed this Apr 2, 2024
@xloya xloya reopened this Apr 2, 2024
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.

LGTM, thanks @xloya for your contribution.

@xloya xloya closed this Apr 2, 2024
@xloya xloya reopened this Apr 2, 2024
@jerryshao jerryshao closed this Apr 2, 2024
@jerryshao jerryshao reopened this Apr 2, 2024
@xloya xloya closed this Apr 3, 2024
@xloya xloya reopened this Apr 3, 2024
@yuqi1129
Copy link
Contributor

yuqi1129 commented Apr 3, 2024

The current CI has some issues due to an image update by Github. Please rebase the PR after #2784 is merged @xloya

@xloya
Copy link
Contributor Author

xloya commented Apr 3, 2024

The current CI has some issues due to an image update by Github. Please rebase the PR after #2784 is merged @xloya

Got it.

@jerryshao jerryshao closed this Apr 3, 2024
@jerryshao jerryshao reopened this Apr 3, 2024
@jerryshao
Copy link
Contributor

Finally, pass the CI, merging to main, thanks @xloya for your work.

@jerryshao jerryshao merged commit 0ccbe70 into apache:main Apr 3, 2024
41 of 53 checks passed
jerryshao added a commit that referenced this pull request Apr 12, 2024
…2768)

### What changes were proposed in this pull request?

Add user documentation for relational entity store. Depends on #2584.

### Why are the changes needed?

Fix: #2348

---------

Co-authored-by: xiaojiebao <[email protected]>
Co-authored-by: Jerry Shao <[email protected]>
@xloya xloya deleted the issue-2349 branch June 20, 2024 01:43
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 Scripts directory to store script files
3 participants