Dear all,
Query the sql in kylin, it shows error. Do you have any ideas
```
Error while compiling generated Java code: public static class Record5_0
implements java.io.Serializable { public long f0; public boolean f1; public
long f2; public boolean f3; public long f4; public Record5_0() {} public
boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof
Record5_0)) { return false; } return this.f0 == ((Record5_0) o).f0 && this.f1
== ((Record5_0) o).f1 && this.f2 == ((Record5_0) o).f2 && this.f3 ==
((Record5_0) o).f3 && this.f4 == ((Record5_0) o).f4; } public int hashCode() {
int h = 0; h = org.apache.calcite.runtime.Utilities.hash(h, this.f0); h =
org.apache.calcite.runtime.Utilities.hash(h, this.f1); h =
org.apache.calcite.runtime.Utilities.hash(h, this.f2); h =
org.apache.calcite.runtime.Utilities.hash(h, this.f3); h =
org.apache.calcite.runtime.Utilities.hash(h, this.f4); return h; } public int
compareTo(Record5_0 that) { int c; c =
org.apache.calcite.runtime.Utilities.compare(this.f0, that.f0); if (c != 0) {
return c; } c = org.apache.calcite.runtime.Utilities.compare(this.f1, that.f1);
if (c != 0) { return c; } c =
org.apache.calcite.runtime.Utilities.compare(this.f2, that.f2); if (c != 0) {
return c; } c = org.apache.calcite.runtime.Utilities.compare(this.f3, that.f3);
if (c != 0) { return c; } c =
org.apache.calcite.runtime.Utilities.compare(this.f4, that.f4); if (c != 0) {
return c; } return 0; } public String toString() { return "{f0=" + this.f0 + ",
f1=" + this.f1 + ", f2=" + this.f2 + ", f3=" + this.f3 + ", f4=" + this.f4 +
"}"; } } org.apache.calcite.DataContext root; public
org.apache.calcite.linq4j.Enumerable bind(final org.apache.calcite.DataContext
root0) { root = root0; final org.apache.calcite.linq4j.Enumerable
_inputEnumerable = ((org.apache.kylin.query.schema.OLAPTable)
root.getRootSchema().getSubSchema("CS").getTable("ODS_CS_T_STD_COMMENT_TIME_DAILY")).executeOLAPQuery(root,
0); final org.apache.calcite.linq4j.AbstractEnumerable child = new
org.apache.calcite.linq4j.AbstractEnumerable(){ public
org.apache.calcite.linq4j.Enumerator enumerator() { return new
org.apache.calcite.linq4j.Enumerator(){ public final
org.apache.calcite.linq4j.Enumerator inputEnumerator =
_inputEnumerable.enumerator(); public void reset() { inputEnumerator.reset(); }
public boolean moveNext() { while (inputEnumerator.moveNext()) { final Object[]
current = (Object[]) inputEnumerator.current(); final String inp0_ = current[0]
== null ? (String) null : current[0].toString(); final String inp7_ =
current[7] == null ? (String) null : current[7].toString(); final String inp3_
= current[3] == null ? (String) null : current[3].toString(); final String
inp4_ = current[4] == null ? (String) null : current[4].toString(); final
String inp2_ = current[2] == null ? (String) null : current[2].toString(); if
(inp0_ != null && org.apache.calcite.runtime.SqlFunctions.ge(inp0_, "20W02") &&
(inp0_ != null && org.apache.calcite.runtime.SqlFunctions.le(inp0_, "20W51"))
&& (inp7_ != null && org.apache.calcite.runtime.SqlFunctions.eq(inp7_, "苏宁易购")
|| inp7_ != null && org.apache.calcite.runtime.SqlFunctions.eq(inp7_, "天猫商城")
```Sql :
```
SELECT
row_number ( ) over ( PARTITION BY 1 ) AS 序号,*
FROM
(
SELECT
*
FROM
(
SELECT
year_week AS 周度,
CATEGORY AS 品类,
BRAND AS 品牌,
PLATFORM AS 渠道,
SHOP_NAME AS 店铺,
MODEL AS 型号,
KWC_CATE AS 评论关键词分类,
KWC_PRIMARY AS 一级维度关键词,
KWC_SECONDARY AS 二级维度关键词,
KWC_THIRD AS 三级维度关键词,
URL AS URL,
KWC_EMOTION AS 是否差评,
SUM( bad_comment_num ) AS 差评数,
SUM( nobad_comment_num ) AS 非差评数,
SUM( bad_comment_num ) / CAST( count( * ) AS DOUBLE ) AS 差评率,
COUNT( * ) AS 评论数
FROM
CS.ODS_CS_T_STD_COMMENT_TIME_DAILY
WHERE
1 = 1
AND year_week >= '20W02'
AND year_week <= '20W51'
AND platform IN ( '苏宁易购', '天猫商城', '京东商城' )
AND category IN ( '洗衣机', '冰箱', '家用空调', '平板电视' )
AND brand IN (
'威力',
'JXG',
'金鱼',
'上海'
)
AND shop_name IN (
'奥克斯瀚华专卖店',
'奥克斯盛元专卖店',
'兴奥电器专营店',
'海尚电器专营店',
'热风电器专营店'
)
GROUP BY
CATEGORY,
BRAND,
PLATFORM,
SHOP_NAME,
MODEL,
KWC_CATE,
KWC_PRIMARY,
KWC_SECONDARY,
KWC_THIRD,
URL,
KWC_EMOTION,周度
) A
ORDER BY
周度 ASC
) B
```ENV:
Kylin version: 3.1.1
Hadoop version: 3.0.0+cdh6.2.1
Best Regards,
Jianxin Liu