Ian Hu created KYLIN-3475: ----------------------------- Summary: Make calcite case handling and quoting method more configurable. Key: KYLIN-3475 URL: https://issues.apache.org/jira/browse/KYLIN-3475 Project: Kylin Issue Type: Improvement Components: Query Engine Reporter: Ian Hu
>> Do you know whether Calcite supports that? If Calcite already supports it >> with some parameter, Kylin can expose that as a configuration. Yes, Calcite >> support to customize some sql handle feature by connection properties. We >> can customize it by provide an Properties when use jdbc's >> DriverManager.getConnection(url, extraProperties). Here is my commit (with >> UT) to achieve this >> [https://github.com/ian4hu/kylin/commit/88ee638fb4c8b55b089294107ad361ec3fc6dae9] >> For short lookup see QueryConnection.getConnection(project)@ >> [https://github.com/apache/kylin/blob/25b300c1f654561e561565ebf35c4e0e93ae0a04/query/src/main/java/org/apache/kylin/query/QueryConnection.java#L51] >> the key is the info variable. Background (from mailing list [http://mail-archives.apache.org/mod_mbox/kylin-dev//201807.mbox/%3C4247fe2a.634d.164e995a707.Coremail.hu2008yinxiang%40163.com%3E] ): We use kylin in our BI system as a sub-query engine. we met some problems in our use case like bellow. # Our visual design tool use source table schema as metadata, and the source table column is lower case or mixed case, and visual tool generate SQL for kylin query. # Kylin execute sql and return result # we use a parser to parse result and assembly it to entities (like ORM engine did) but the problem is that kylin now always casting the column to UPPER case, that break our parser and whe can not change that behavior by configure kylin. like "select 1 as value_ALIAS" we always get the column named "VALUE_ALIAS" instead of "value_ALIAS" from Kylin. although we can use 'select 1 as "value_ALIAS"' (with double-qouted alias) and it will be better if we can configure the quoting method. I would like contribute features to make the query engine is more flexible # First of all, make the case handling and quoting method is configurable by kylin.properties, that a global configuration. # Second make case handling and quoting method available by JDBC connection url parameters or connection properties by DriverManager.getConnection(url-with-parameters, extra-properties) -- This message was sent by Atlassian JIRA (v7.6.3#76005)