You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shaofeng SHI (JIRA)" <ji...@apache.org> on 2016/04/27 08:47:12 UTC
[jira] [Commented] (KYLIN-1622) sql not executed and report topN
error
[ https://issues.apache.org/jira/browse/KYLIN-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15259651#comment-15259651 ]
Shaofeng SHI commented on KYLIN-1622:
-------------------------------------
I updated the code so that it will not throw such error when there is no "SUM (t0.PRICE) " appeared in the SQL query.
But please aware that, if no "SUM (t0.PRICE)" appeared in SQL, the TopN measure will not be used to serve the query. So it should throw error like "Can't find any realization. "
> sql not executed and report topN error
> --------------------------------------
>
> Key: KYLIN-1622
> URL: https://issues.apache.org/jira/browse/KYLIN-1622
> Project: Kylin
> Issue Type: Bug
> Components: Query Engine
> Reporter: Zhong,Jason
> Assignee: Shaofeng SHI
> Attachments: kylin_sales_cube_desc_TOPN.json
>
>
> pull the latest code from master branch, commit id is d899a67963af14f80fc047a9253ac7736c1983f3,
> package and deploy in sandbox, and run bin/sample.sh to get sample cube "kylin_sales_cube", and created a cube called "kylin_sales_cube_desc_TOPN". I build "kylin_sales_cube_desc_TOPN" first and then build "kylin_sales_cube".
> topN sql is
> "
> SELECT
> SUM (t0.PRICE), t1.WEEK_BEG_DT
> FROM "DEFAULT".KYLIN_SALES AS t0
> INNER JOIN "DEFAULT".KYLIN_CAL_DT AS t1
> ON t0.PART_DT = t1.CAL_DT
> GROUP BY
> t1.WEEK_BEG_DT
> ORDER BY SUM (t0.PRICE)
> "
> but !!!
> when run sql
> "
> SELECT
> t1.WEEK_BEG_DT
> FROM "DEFAULT".KYLIN_SALES AS t0
> INNER JOIN "DEFAULT".KYLIN_CAL_DT AS t1
> ON t0.PART_DT = t1.CAL_DT
> GROUP BY
> t1.WEEK_BEG_DT
> "
> it reports
> Error while executing SQL "SELECT t1.WEEK_BEG_DT FROM "DEFAULT".KYLIN_SALES AS t0 INNER JOIN "DEFAULT".KYLIN_CAL_DT AS t1 ON t0.PART_DT = t1.CAL_DT GROUP BY t1.WEEK_BEG_DT LIMIT 50000": When query with topN, only one metrics is allowed.
> I'll attach kylin_sales_cube_desc_TOPN.json
> for "kylin_sales_cube" you can run bin/sample.sh
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)