[ https://issues.apache.org/jira/browse/KYLIN-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17574455#comment-17574455 ]
gaogao commented on KYLIN-5215: ------------------------------- example: select count(*) as "COUNT__stime" from tabletest 在指标查询的时候加上 as 和双引号就会这样。 cube query result: {isNullable: 0, displaySize: 19, label: "COUNT__stime", name: "COUNT__stime", schemaName: null,…} pushdown query result: {isNullable: 0, displaySize: 2147483647, label: "COUNT__STIME", name: "COUNT__STIME", schemaName: null,…} > The metadata information returned by Kylin pushdown query and Cube query is > inconsistent > ---------------------------------------------------------------------------------------- > > Key: KYLIN-5215 > URL: https://issues.apache.org/jira/browse/KYLIN-5215 > Project: Kylin > Issue Type: Bug > Components: Spark Engine > Affects Versions: all, v4.0.1 > Environment: kylin 4.0.1 > Reporter: gaogao > Priority: Major > Attachments: cube_query.png, pushdown_query.png > > > 问题: > 在下压查询中返回的结果 和 cube 查询的结果不一致,下压查询中 columnMetas 的 label 和 name 字段会默认转换成大写! > 对应源码类 > PushDownRunnerSparkImpl 50行 > : > > {code:java} > // fill in selected column meta > for (int i = 0; i < columnCount; ++i) { > int nullable = fieldList.get(i).isNullable() ? 1 : 0; > columnMetas.add(new SelectedColumnMeta(false, false, false, false, nullable, > true, Integer.MAX_VALUE, > fieldList.get(i).getName().toUpperCase(Locale.ROOT), > fieldList.get(i).getName().toUpperCase(Locale.ROOT), null, null, > null, fieldList.get(i).getPrecision(), fieldList.get(i).getScale(), > fieldList.get(i).getDataType(), > fieldList.get(i).getDataTypeName(), false, false, false)); > } > > {code} > > pushdown query: > !c:\Users\Administrator\AppData\Local\YNote\data\weixinobU7VjlOcNgcm0ZbmNGYzYRPZ__4\401fe7a7ea05495799145f2d413b0da4\clipboard.png! > cube query: > !c:\Users\Administrator\AppData\Local\YNote\data\weixinobU7VjlOcNgcm0ZbmNGYzYRPZ__4\0ef826f0229f42b59c4ad946a08bf6f3\clipboard.png! > > 我认为这个问题应该修复,因为在尝试对接superset时发现,有些此类框架会强校验元数据列的大小写,如果默认进行转换会导致无法适配,且cube > query和pushdown query查询的元数据列结果不一致这也是无法接受的。 > > 如果讨论有需要的话,我可以修复他,谢谢~ -- This message was sent by Atlassian Jira (v8.20.10#820010)