Hi Krzysztof,

Have you checked your cubes’ status (disabled or deleted)?





Best regards,

 

Ni Chunen / George



On 04/10/2019 22:49,Krzysztof Zarzycki<[email protected]> wrote:
Hello Kylin community,


We stumbled upon a problem in Kylin 2.6.1: We built a cube yesterday and it was 
working fine.  For one of the columns ("latitude") of our input data it had a 
SUM() measure and we used in queries AVG() aggregate successfully, e.g.:
select sum(latitude),count(*), avg(latitude) from kylin_tickets left join 
kylin_dic_store using (id_store)



Today, we don't know why it stopped working, and return an error:

2019-04-10 15:34:53,024 INFO  [Query fc6b32d8-45f1-141d-bc5d-2785190e1180-65] 
service.QueryService:403 : Using project: Test
2019-04-10 15:34:53,024 INFO  [Query fc6b32d8-45f1-141d-bc5d-2785190e1180-65] 
service.QueryService:404 : The original query:  select sum(latitude),count(*), 
avg(latitude) from kylin_tickets left join kylin_dic_store using (id_store) 
limit 10;
2019-04-10 15:34:53,028 INFO  [Query fc6b32d8-45f1-141d-bc5d-2785190e1180-65] 
service.QueryService:619 : The corrected query: select sum(latitude),count(*), 
avg(latitude) from kylin_tickets left join kylin_dic_store using (id_store) 
limit 10
2019-04-10 15:34:53,047 ERROR [Query fc6b32d8-45f1-141d-bc5d-2785190e1180-65] 
service.QueryService:510 : Exception while executing query
java.sql.SQLException: Error while executing SQL "select 
sum(latitude),count(*), avg(latitude) from kylin_tickets left join 
kylin_dic_store using (id_store) limit 10": Table not found by 
REPORT_SALES.KYLIN_DIC_STORE
        at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
        at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
        at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156)
        at 
org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:218)
        at 
org.apache.kylin.rest.service.QueryService.executeRequest(QueryService.java:938)
        at 
org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:641)
        at 
org.apache.kylin.rest.service.QueryService.query(QueryService.java:208)
        at 
org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:468)
        at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:429)
        at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:367)
...
Caused by: java.lang.IllegalArgumentException: Table not found by 
REPORT_SALES.KYLIN_DIC_STORE
        at 
org.apache.kylin.metadata.model.DataModelDesc.findTable(DataModelDesc.java:320)
        at 
org.apache.kylin.metadata.model.TblColRef.fixUnknownModel(TblColRef.java:89)
        at 
org.apache.kylin.query.relnode.OLAPContext.belongToFactTableDims(OLAPContext.java:239)
        at 
org.apache.kylin.query.relnode.OLAPAggregateRel.buildAggregations(OLAPAggregateRel.java:369)
        at 
org.apache.kylin.query.relnode.OLAPAggregateRel.buildColumnRowType(OLAPAggregateRel.java:216)
        at 
org.apache.kylin.query.relnode.OLAPAggregateRel.implementOLAP(OLAPAggregateRel.java:189)
        at 
org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:84)
        at 
org.apache.kylin.query.relnode.OLAPProjectRel.implementOLAP(OLAPProjectRel.java:132)
        at 
org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:84)
        at 
org.apache.kylin.query.relnode.OLAPLimitRel.implementOLAP(OLAPLimitRel.java:77)
        at 
org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:84)
        at 
org.apache.kylin.query.relnode.OLAPToEnumerableConverter.implement(OLAPToEnumerableConverter.java:75)
        at 
org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:103)
        at 
org.apache.calcite.adapter.enumerable.EnumerableInterpretable.toBindable(EnumerableInterpretable.java:92)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl$CalcitePreparingStmt.implement(CalcitePrepareImpl.java:1278)
        at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:331)
        at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:230)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:796)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:655)
        at 
org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:618)
        at 
org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:221)
        at 
org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:603)
        at 
org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:638)
        at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:149)
        ... 85 more
...
==========================[QUERY]===============================
Query Id: fc6b32d8-45f1-141d-bc5d-2785190e1180
SQL: select sum(latitude),count(*), avg(latitude) from kylin_tickets left join 
kylin_dic_store using (id_store) limit 10;
User: ADMIN
Success: false
Duration: 0.026
Project: Test
Realization Names: []
Cuboid Ids: []
Total scan count: 0
Total scan bytes: 0
Result row count: 0
Accept Partial: true
Is Partial Result: false
Hit Exception Cache: false
Storage cache used: false
Is Query Push-Down: false
Is Prepare: false
Trace URL: null
Message: Table not found by REPORT_SALES.KYLIN_DIC_STORE
while executing SQL: "select sum(latitude),count(*), avg(latitude) from 
kylin_tickets left join kylin_dic_store using (id_store) limit 10"
==========================[QUERY]===============================


2019-04-10 15:34:53,050 ERROR [http-nio-7070-exec-1] 
controller.BasicController:63 :
org.apache.kylin.rest.exception.InternalErrorException: Table not found by 
REPORT_SALES.KYLIN_DIC_STORE
while executing SQL: "select sum(latitude),count(*), avg(latitude) from 
kylin_tickets left join kylin_dic_store using (id_store) limit 10"
        at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:441)
        at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:367)
        at 
org.apache.kylin.rest.controller.QueryController.query(QueryController.java:87)
        at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
...




* We tried using just SUM(latitude) and it worked fine.
* We tried using COUNT(latitude) and it failed with the same issue
* We created exactly the same cube in new project and all queries worked again. 
* We tried restarting Kylin and it didn't help either. 


Now we don't know what is/was the cause and we're afraid that an error returns 
tomorrow.

Could you please help us investigate the issue, find a fix and/or a workaround?


Thank you,
Krzysztof

Reply via email to