rongchuan.jin created KYLIN-5016:
------------------------------------
Summary: Avoid potential NPE issue in RDBMS Pushdown case
Key: KYLIN-5016
URL: https://issues.apache.org/jira/browse/KYLIN-5016
Project: Kylin
Issue Type: Improvement
Components: RDBMS Source
Affects Versions: v3.1.2, v2.6.5
Reporter: rongchuan.jin
Assignee: rongchuan.jin
When I use pushdown with RDBMS source, I encounter some error when convert sql
which leads to pushdown failing.
I find below stacktrace like
`2020-12-23 13:14:10,212 ERROR [Query a1bf28bb-de28-433e-ab96-28ce234a1a4a-76]
conv.SqlConverter : Failed to default convert sql, will use the origin input:
select 1 from `MOVIES_10M`.`DIM_MOVIES_10M` 2LIMIT 500
3java.lang.NullPointerException 4 at
org.apache.calcite.sql.SqlCall.unparse(SqlCall.java:103) 5 at
org.apache.calcite.sql.pretty.SqlPrettyWriter.format(SqlPrettyWriter.java:806)
6 at
org.apache.kylin.sdk.datasource.framework.conv.SqlConverter.convertSql(SqlConverter.java:69)
7 at
org.apache.kylin.sdk.datasource.framework.JdbcConnector.convertSql(JdbcConnector.java:91)
8 at
org.apache.kylin.sdk.datasource.PushDownRunnerSDKImpl.executeQuery(PushDownRunnerSDKImpl.java:55)
9 at
org.apache.kylin.query.util.PushDownUtil.tryPushDownQuery(PushDownUtil.java:173)
10 at
org.apache.kylin.query.util.PushDownUtil.tryPushDownSelectQuery(PushDownUtil.java:103)
11 at
org.apache.kylin.rest.service.QueryService.tryPushDownSelectQuery(QueryService.java:773)
12 at
org.apache.kylin.rest.service.QueryService.pushDownQuery(QueryService.java:709)
13 at
org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:700)
14 at org.apache.kylin.rest.service.QueryService.query(QueryService.java:231)
15 at
org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:577)
16 at
org.apache.kylin.rest.service.QueryService.queryWithCache(QueryService.java:512)
17 at
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:395)`
--
This message was sent by Atlassian Jira
(v8.3.4#803005)