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

Support parsing Doris sql(#31507) #33316

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

wangyang377
Copy link

@wangyang377 wangyang377 commented Oct 19, 2024

Fixes #31507.

Changes proposed in this pull request:

  • optimize install plugin statement. The original statement is MySql style which is incompatible with doris syntax
  • support yearweek, strright,rtrim function
  • support ADMIN-CANCEL-REBALANCE-DISK statement

the lead statement is already supported.

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

;
strrightFunction
: (STRRIGHT | RIGHT) LP_ expr COMMA_ expr RP_
;
Copy link
Member

Choose a reason for hiding this comment

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

Please add new line after this systax.

@@ -284,7 +284,13 @@ installComponent
;

installPlugin
: INSTALL PLUGIN pluginName SONAME shardLibraryName
// : INSTALL PLUGIN pluginName SONAME shardLibraryName
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this cooment.

CANCEL : C A N C E L;
REBALANCE : R E B A L A N C E;
STRRIGHT : S T R R I G H T;
YEARWEEK : Y E A R W E E K;
Copy link
Member

Choose a reason for hiding this comment

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

Please add new line at the end of file.

@@ -20,4 +20,7 @@
<sql-case id="install_component" value="INSTALL COMPONENT 'file://component1'" db-types="MySQL" />
<sql-case id="install_components" value="INSTALL COMPONENT 'file://component1', 'file://component2'" db-types="MySQL" />
<sql-case id="install_plugin" value="INSTALL PLUGIN binlog SONAME 'shared_library_name'" db-types="MySQL" />

Copy link
Member

Choose a reason for hiding this comment

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

Please remove useless blank line.

@@ -20,4 +20,7 @@
<sql-case id="install_component" value="INSTALL COMPONENT 'file://component1'" db-types="MySQL" />
<sql-case id="install_components" value="INSTALL COMPONENT 'file://component1', 'file://component2'" db-types="MySQL" />
<sql-case id="install_plugin" value="INSTALL PLUGIN binlog SONAME 'shared_library_name'" db-types="MySQL" />

<sql-case id="install_plugin_doris" value="INSTALL PLUGIN FROM &quot;http://mywebsite.com/plugin.zip&quot; PROPERTIES( &quot;md5sum &quot; = &quot;73877f6029216f4314d712086a146570 &quot;)" db-types="Doris" />

Copy link
Member

Choose a reason for hiding this comment

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

Please remove useless blank line.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for your review. I made some optimizations.

@strongduanmu
Copy link
Member

Hi @wangyang377, can you solve code conflict?

@wangyang377
Copy link
Author

Hi @wangyang377, can you solve code conflict?

of course, I made some optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support parsing Doris sql
2 participants