Hi Feng,




Thanks for your promote reply. :)




Lex is just what i want. But when i tried to use it, i encountered another 
problem. 




The first usage is ok, but the second one doesn’t work. ThoughLex are used in 
different methods, the result will be same, i think. Do i misunderstand? Or is 
the second one wrong usage?




The first usage:




CONNECTION_URL = "jdbc:calcite:lex=MYSQL;model=xxxx"

try (Connection connection = DriverManager.getConnection(CONNECTION_URL);

     Statement statement = connection.createStatement()) {

    // do some things

} 




The second usage:




CONNECTION_URL = "jdbc:calcite:model="

Properties properties = new Properties();

properties.put(CalciteConnectionProperty.LEX, Lex.MYSQL);

try (Connection connection = DriverManager.getConnection(CONNECTION_URL, 
properties);

     Statement statement = connection.createStatement()) {

    // do some things

} 




Thanks again for your kindness, and waiting  for u. :)




Regards,

Trista





| |
Juan Pan
|
|
panj...@apache.org
Juan Pan(Trista), Apache ShardingSphere
|


On 09/11/2019 20:23,Feng Zhu<wellfeng...@gmail.com> wrote:
Hi, JuanPan,
You can refer to Lex, which decides how identifiers are quoted, whether
they are converted to upper-case
org.apache.calcite.config.Lex

Regards

Juan Pan <panj...@apache.org> 于2019年9月11日周三 下午8:05写道:



Hi, all the committers and contributors,


This email is for your help.


I am now deep in Apache Calcite, and it’s great. Now, i want to know
whether it is possible that unquoted identifiers are not implicitly
converted to upper case?


For example, a SQL is `select name from test`, when it was executed, an
exception is thrown:


org.apache.calcite.sql.validate.SqlValidatorException: Object 'TEST' not
found within 'memory'; did you mean 'test’?


I wonder there is any setting that can make `name` and `test`  recognized
correctly by Calcite without double quotes.


Thanks for your help.


Regards,
Trista
-------------------------------------------------------
Email:panj...@apache.org
Juan Pan(Trista) Apache ShardingSphere


Reply via email to