You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/04/08 08:26:00 UTC

[GitHub] [incubator-shardingsphere] zhaox1n opened a new issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

zhaox1n opened a new issue #5105: SQLParseEngin: Cannot support database type 'MySQL'
URL: https://github.com/apache/incubator-shardingsphere/issues/5105
 
 
   ## Question
   
   I only want to use the parser module of shardingsphere  . But it shows that `Cannot support database type 'Mysql'`.
   
   ```java
   SQLParseEngine sqlParseEngine = SQLParseEngineFactory.getSQLParseEngine("MySQL");
   SQLStatement sqlStatement = sqlParseEngine.parse(sql, false);
   ```
   I am not sure it is a bug or it cannot use as i mentioned. The version i used is `shardingsphere-sql-parser-engine:4.0.1`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'
URL: https://github.com/apache/incubator-shardingsphere/issues/5105#issuecomment-610851777
 
 
   What is your requirement for using ShardingSphere without SQL parser? I think it is not the correct way to use ShardingSphere

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] yoloz commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
yoloz commented on issue #5105:
URL: https://github.com/apache/shardingsphere/issues/5105#issuecomment-626101629


   the same demand that need use shardingsphere-sql-parser independently.
   problem:
   **Exception in thread "main" java.lang.UnsupportedOperationException: Cannot support database type 'MySql'**
   
   use like:
   ```
   SQLParseEngine sqlParseEngine = SQLParseEngineFactory.getSQLParseEngine("MySQL");
   SQLStatement sqlStatement = sqlParseEngine.parse(sql, false);
   ```
   dependencies:
   ```
   <dependencies>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-engine</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-binder</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-spi</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-oracle</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-sql92</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-sqlserver</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-postgresql</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-mysql</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-statement</artifactId>
               <version>4.1.0</version>
           </dependency>
       </dependencies>
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] zhaox1n closed issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
zhaox1n closed issue #5105: SQLParseEngin: Cannot support database type 'MySQL'
URL: https://github.com/apache/incubator-shardingsphere/issues/5105
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] yoloz removed a comment on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
yoloz removed a comment on issue #5105:
URL: https://github.com/apache/shardingsphere/issues/5105#issuecomment-626108989


   @zhaox1n how to solve it in the end?
   
   i had add all sql-parser dependency 
   ```
       <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-engine</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-binder</artifactId>
               <version>4.1.0</version>
           </dependency>
   ...
    <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-postgresql</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-mysql</artifactId>
               <version>4.1.0</version>
           </dependency>
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] zhaox1n commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
zhaox1n commented on issue #5105:
URL: https://github.com/apache/shardingsphere/issues/5105#issuecomment-626113258


   ```
   <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-core</artifactId>
               <version>4.1.0</version>
   </dependency>
   ```
   The core jar seems should be added too. @yoloz


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yoloz removed a comment on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
yoloz removed a comment on issue #5105:
URL: https://github.com/apache/shardingsphere/issues/5105#issuecomment-626101629


   the same demand that need use shardingsphere-sql-parser independently.
   problem:
   **Exception in thread "main" java.lang.UnsupportedOperationException: Cannot support database type 'MySql'**
   
   use like:
   ```
   SQLParseEngine sqlParseEngine = SQLParseEngineFactory.getSQLParseEngine("MySQL");
   SQLStatement sqlStatement = sqlParseEngine.parse(sql, false);
   ```
   dependencies:
   ```
   <dependencies>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-engine</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-binder</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-spi</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-oracle</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-sql92</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-sqlserver</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-postgresql</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-mysql</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-statement</artifactId>
               <version>4.1.0</version>
           </dependency>
       </dependencies>
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] terrymanu commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'
URL: https://github.com/apache/incubator-shardingsphere/issues/5105#issuecomment-610924413
 
 
   OK, I understand. You can use shardingsphere-sql-parser independently.
   Beside import shardingsphere-sql-parser-engine, you also need to import sql dialect modules

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] zhaox1n commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
zhaox1n commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'
URL: https://github.com/apache/incubator-shardingsphere/issues/5105#issuecomment-610858521
 
 
   > What is your requirement for using ShardingSphere without SQL parser? I think it is not the correct way to use ShardingSphere
   
   I mean that I only want to use the SQL parser module of ShardingSphere for SQL analysis for mysql.  Maybe I could use the Ali Druid parser module. Or only use the antrl4 model of the parser. 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] yoloz commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
yoloz commented on issue #5105:
URL: https://github.com/apache/shardingsphere/issues/5105#issuecomment-626119065


   thanks, at last i found is databaseType case sensitivity


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] zhaox1n commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
zhaox1n commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'
URL: https://github.com/apache/incubator-shardingsphere/issues/5105#issuecomment-611003222
 
 
   Thanks for answering

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] yoloz commented on issue #5105: SQLParseEngin: Cannot support database type 'MySQL'

Posted by GitBox <gi...@apache.org>.
yoloz commented on issue #5105:
URL: https://github.com/apache/shardingsphere/issues/5105#issuecomment-626108989


   @zhaox1n how to solve it in the end?
   
   i had add all sql-parser dependency 
   ```
       <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-engine</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-binder</artifactId>
               <version>4.1.0</version>
           </dependency>
   ...
    <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-postgresql</artifactId>
               <version>4.1.0</version>
           </dependency>
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-sql-parser-mysql</artifactId>
               <version>4.1.0</version>
           </dependency>
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org