-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
feat:support Apache Doris database connector #22836
base: devel
Are you sure you want to change the base?
Conversation
@E1izabeth PTAL thanks |
Thank you for contribution |
You're welcome. Is there anything else I need to do? |
We will review your PR and let you know. |
Hello @liugddx Could you please change the background of the icons to transparent? https://github.com/dbeaver/dbeaver/blob/devel/plugins/org.jkiss.dbeaver.ext.mysql/plugin.xml#L287 And the last one:
Are all these parameters correct? Dorris doesn't support partitions/triggers etc. |
The partition of doris is different from that of mysql. https://doris.apache.org/docs/data-table/data-partition |
Okay. It is clear about partitions. |
I can provide this part of the ability in the next pr. I need to understand this part of the code. |
What questions do you have? Is something unclear? |
About the partition. |
This parameter means that partitions will not shown in the database navigator tree. So, I asked - whether it was correct for your database or not. Now I see that this is correct. And the last question - did you check your logo in the dark theme in DBeaver? I don't think the dark text will look okay on the dark background. |
I will add it under this PR
|
@LonwoLonwo Thanks for your review. |
You can add partitions and indexes support as a separate PR if you want. For now, I'm waiting only for the correct logo for this PR. |
I've tested it and the logo is displayed properly |
Thanks for the images! |
This is the data model of doris. |
Yeah, this table DDL is a working one. Thanks. |
At least NPE you need to solve here, in this PR. Other issues can be fixed in other PRs. |
The null pointer is due to doris not supporting |
@LonwoLonwo Hi, is this explanation okay? All functions are fine in console. |
We can't implement not working functionality. We can ignore some small or complex implementations, but here is just NPE and our main functionality. So, you need to fix this in this PR. |
With the latest doris version, the null pointer exception has been fixed. |
And how soon will the release with the fix be available? |
Probably at the end of March, But you can directly use the master branch for testing. |
Another point, since the syntax for creating a database in Doris is |
I found starrocks had the same problem. |
No, I can't reproduce it in DBeaver with the latest StarRocks.
Ok, it can be a special parameter. Like |
Okay, does this also need to be repaired in this pr? |
Yes. Please implement it in this PR. |
PTAL @LonwoLonwo |
@LonwoLonwo Kindly pin. Can you help me drive PR? |
appendDatabaseModifiers(catalog, script); | ||
final StringBuilder script; | ||
if (catalog.getDataSource().isDoris()) { | ||
script = new StringBuilder("CREATE DATABASE `" + catalog.getName() + "`"); |
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.
And how about the DROP and ALTER statements in this class?
@@ -64,8 +64,14 @@ protected MySQLCatalog createDatabaseObject(DBRProgressMonitor monitor, DBEComma | |||
protected void addObjectCreateActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectCreateCommand command, Map<String, Object> options) | |||
{ | |||
final MySQLCatalog catalog = command.getObject(); | |||
final StringBuilder script = new StringBuilder("CREATE SCHEMA `" + catalog.getName() + "`"); | |||
appendDatabaseModifiers(catalog, script); | |||
final StringBuilder script; |
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.
Please reformat this code please.
Because we are not using quotes anymore, we have a special function.
So, it will be
String catalogName = DBUtils.getQuotedIdentifier(catalog);
...
new StringBuilder("CREATE DATABASE " + catalogName);
...
new StringBuilder("CREATE SCHEMA " + catalogName);
And now you have the isDoris() method, which can help you to fix NPE, wdyt? |
Hello @liugddx Do you have any questions about the last review comments? Would you like any help from us? |
NPE has been fixed. |
This PR is temporarily suspended. |
Apache Doris is a high-performance, real-time analytic database based on the MPP architecture and is known for its extreme speed and ease of use. It takes only sub-second response times to return query results under massive amounts of data, and can support not only highly concurrent point query scenarios, but also high-throughput complex analytic scenarios. This brief guide will show you how to download the latest stable version of Doris, install and run it on a single node, including creating databases, data tables, importing data and queries.
It uses mysql dialect.