kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ShaoFeng Shi <shaofeng...@apache.org>
Subject Re: Syntax error in Kylin - even though query works in Hive
Date Wed, 07 Sep 2016 15:11:29 GMT
DEFAULT is a reserved keyword in Apache Calcite (which acts as Kylin's SQL
parser) ; when use it in SQL, please add double quote ("DEFAULT") to
escape;

2016-09-07 13:17 GMT+08:00 Something Something <mailinglists19@gmail.com>:

> Here's a query that works in Hive, but gives a syntax error in Kylin. Any
> idea why?
>
> select part_dt, kylin_sales.LEAF_CATEG_ID, LSTG_FORMAT_NAME, LSTG_SITE_ID,
> META_CATEG_NAME, sum(price), max(price), min(price) from kylin_sales INNER
> JOIN DEFAULT.KYLIN_CATEGORY_GROUPINGS as KYLIN_CATEGORY_GROUPINGS ON
> KYLIN_SALES.LEAF_CATEG_ID = KYLIN_CATEGORY_GROUPINGS.LEAF_CATEG_ID AND
> KYLIN_SALES.LSTG_SITE_ID = KYLIN_CATEGORY_GROUPINGS.SITE_ID group by
> part_dt, kylin_sales.LEAF_CATEG_ID, LSTG_FORMAT_NAME, LSTG_SITE_ID,
> META_CATEG_NAME order by part_dt, kylin_sales.LEAF_CATEG_ID,
> LSTG_FORMAT_NAME, LSTG_SITE_ID, META_CATEG_NAME;
>
>
> Error message:
>
> Encountered "DEFAULT" at line 1, column 156. Was expecting one of:
> <IDENTIFIER> ... <QUOTED_IDENTIFIER> ... <BACK_QUOTED_IDENTIFIER> ...
> <BRACKET_QUOTED_IDENTIFIER> ... <UNICODE_QUOTED_IDENTIFIER> ... "LATERAL"
> ... "(" ... "UNNEST" ... "TABLE" ...
>



-- 
Best regards,

Shaofeng Shi

Mime
View raw message