-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improvement](jdbc catalog) Optimize JdbcCatalog case mapping stability #41510
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
196 changes: 163 additions & 33 deletions
196
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java
Large diffs are not rendered by default.
Oops, something went wrong.
238 changes: 202 additions & 36 deletions
238
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,10 +71,13 @@ public class ExternalTable implements TableIf, Writable, GsonPostProcessable { | |
| protected long id; | ||
| @SerializedName(value = "name") | ||
| protected String name; | ||
| @SerializedName(value = "remoteName") | ||
| protected String remoteName; | ||
| @SerializedName(value = "type") | ||
| protected TableType type = null; | ||
| @SerializedName(value = "timestamp") | ||
| protected long timestamp; | ||
| // dbName is temporarily retained and will be deleted later. To use dbName, please use db.getFullName() | ||
| @SerializedName(value = "dbName") | ||
| protected String dbName; | ||
| @SerializedName(value = "ta") | ||
|
|
@@ -86,6 +89,7 @@ public class ExternalTable implements TableIf, Writable, GsonPostProcessable { | |
| protected long dbId; | ||
| protected boolean objectCreated; | ||
| protected ExternalCatalog catalog; | ||
| protected ExternalDatabase db; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also mark |
||
|
|
||
| /** | ||
| * No args constructor for persist. | ||
|
|
@@ -99,15 +103,19 @@ public ExternalTable() { | |
| * | ||
| * @param id Table id. | ||
| * @param name Table name. | ||
| * @param remoteName Remote table name. | ||
| * @param catalog ExternalCatalog this table belongs to. | ||
| * @param dbName Name of the db the this table belongs to. | ||
| * @param db ExternalDatabase this table belongs to. | ||
| * @param type Table type. | ||
| */ | ||
| public ExternalTable(long id, String name, ExternalCatalog catalog, String dbName, TableType type) { | ||
| public ExternalTable(long id, String name, String remoteName, ExternalCatalog catalog, ExternalDatabase db, | ||
| TableType type) { | ||
| this.id = id; | ||
| this.name = name; | ||
| this.remoteName = remoteName; | ||
| this.catalog = catalog; | ||
| this.dbName = dbName; | ||
| this.db = db; | ||
| this.dbName = db.getFullName(); | ||
| this.type = type; | ||
| this.objectCreated = false; | ||
| } | ||
|
|
@@ -116,6 +124,14 @@ public void setCatalog(ExternalCatalog catalog) { | |
| this.catalog = catalog; | ||
| } | ||
|
|
||
| public void setDb(ExternalDatabase db) { | ||
| this.db = db; | ||
| } | ||
|
|
||
| public void setRemoteName(String remoteName) { | ||
| this.remoteName = remoteName; | ||
| } | ||
|
|
||
| public boolean isView() { | ||
| return false; | ||
| } | ||
|
|
@@ -141,6 +157,10 @@ public String getName() { | |
| return name; | ||
| } | ||
|
|
||
| public String getRemoteName() { | ||
| return remoteName; | ||
| } | ||
|
|
||
| @Override | ||
| public TableType getType() { | ||
| return type; | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remoteNamemaybe null when upgrading from old version. How to handle it?