Hi Hu, We welcome community contributions, but I'm not sure whether this behavior is in Kylin or not. I think it is in Apache Calcite, which is the SQL parser of Kylin. (I don't remember Kylin has the logic to change the column name)
Usually, the column/table name in the database is case-insensitive; Column "Col1" and "COL1" are the same. The application should aware that. Besides, as you mentioned, if you use double-quote for the column name, it will keep the original case in the result set; This is the recommended way I think. So this sounds like an issue already has the solution. Just my comments; Please share more insights if you have. 2018-07-30 13:07 GMT+08:00 胡继续 <[email protected]>: > Hello guys > > > We use kylin in our BI system as a sub-query engine. we met some problems > in our use case like bellow. > 1. 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. > 2. Kylin execute sql and return result > 3. 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 > 1. First of all, make the case handling and quoting method is configurable > by kylin.properties, that a global configuration. > 2. Second make case handling and quoting method available by JDBC > connection url parameters or connection properties by > DriverManager.getConnection(url-with-parameters, extra-properties) > > > Are the features above is matter to contribute? Please give me feedback > and I will make a contribution. -- Best regards, Shaofeng Shi 史少锋
