kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Temple Zhou (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KYLIN-3460) {fn CURRENT_DATE()} parse error
Date Thu, 19 Jul 2018 10:21:00 GMT

     [ https://issues.apache.org/jira/browse/KYLIN-3460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Temple Zhou updated KYLIN-3460:
-------------------------------
    Description: 
Dear all,

I'm facing a very critical problem. When I use Tableau 10.5 with Kylin 2.1.0, the Tableau
Server will send many SQL with "{fn CURRENT_DATE()}"  via ODBC Driver, and the Kylin Server
2.1.0 will parse the CURRENT_DATE() to "2018-07-20 00:00:00"(the real current date). the logs
are as below

{noformat}
Query Id: 14e7b152-6be0-4539-8fd0-c28bbffa6b25
SQL: SELECT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV" AS "AV",
       COUNT(DISTINCT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."MC") AS "usr_Calculation_267682710052360192_ok"
FROM "ADL"."APP_DAILY_ACTIVE_USER_PROPERTY_DI" "APP_DAILY_ACTIVE_USER_PROPERTY_DI"
LEFT JOIN "DIM"."APP" "APP" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AC" = "APP"."ID")
INNER JOIN "DIM"."CALENDAR" "CALENDAR" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT"
= "CALENDAR"."CAL_DT")
WHERE ((CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) >= {ts '2018-06-20
00:00:00'})
       AND (CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) < {ts '2018-07-20
00:00:00'})
       AND ("APP"."NAME" = 'xxx'))
GROUP BY "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV"
User: ADMIN
Success: true
Duration: 0.06
Project: app
{noformat}

However, recently, I upgrade my Kylin Server to 2.3.1 even 2.4.0, then there are many Tableau
reports get the same error due to the SQL contain {fn CURRENT_DATE()}
[Tableau Error Image|https://ws3.sinaimg.cn/large/006tKfTcgy1ftfbzshgs1j30fc0g2dhi.jpg]

Besides, I found that the logs(2.3.1&2.4.0) are different from the logs(2.1.0), the logs(2.4.0)
are as below

{noformat}
Query Id: b160f20c-84e4-4b81-bfe9-54ed22a723d6
SQL: SELECT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV" AS "AV",
       COUNT(DISTINCT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."MC") AS "usr_Calculation_267682710052360192_ok"
FROM "ADL"."APP_DAILY_ACTIVE_USER_PROPERTY_DI" "APP_DAILY_ACTIVE_USER_PROPERTY_DI"
LEFT JOIN "DIM"."APP" "APP" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AC" = "APP"."ID")
INNER JOIN "DIM"."CALENDAR" "CALENDAR" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT"
= "CALENDAR"."CAL_DT")
WHERE ((CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) >= {fn TIMESTAMPADD(SQL_TSI_DAY,-29,{fn
CURRENT_DATE()})})
       AND (CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) < {fn TIMESTAMPADD(SQL_TSI_DAY,1,{fn
CURRENT_DATE()})})
       AND ("APP"."NAME" = 'xxx')
       AND ("APP"."PLATFORM" = 'Android'))
GROUP BY "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV"
User: ADMIN
Success: false
Duration: 0.029
Project: app
{noformat}

  was:
Dear all,

I'm facing a very critical problem. When I use Tableau 10.5 with Kylin 2.1.0, the Tableau
Server will send many SQL with "{fn CURRENT_DATE()}"  via ODBC Driver, and the Kylin Server
2.1.0 will parse the CURRENT_DATE() to "2018-07-20 00:00:00"(the real current date). the logs
are as below
{noformat}
Query Id: 14e7b152-6be0-4539-8fd0-c28bbffa6b25
SQL: SELECT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV" AS "AV",
       COUNT(DISTINCT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."MC") AS "usr_Calculation_267682710052360192_ok"
FROM "ADL"."APP_DAILY_ACTIVE_USER_PROPERTY_DI" "APP_DAILY_ACTIVE_USER_PROPERTY_DI"
LEFT JOIN "DIM"."APP" "APP" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AC" = "APP"."ID")
INNER JOIN "DIM"."CALENDAR" "CALENDAR" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT"
= "CALENDAR"."CAL_DT")
WHERE ((CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) >= {ts '2018-06-20
00:00:00'})
       AND (CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) < {ts '2018-07-20
00:00:00'})
       AND ("APP"."NAME" = 'xxx'))
GROUP BY "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV"
User: ADMIN
Success: true
Duration: 0.06
Project: app
{noformat}
However, recently, I upgrade my Kylin Server to 2.3.1 even 2.4.0, then there are many Tableau
reports get the same error due to the SQL contain {fn CURRENT_DATE()}
[Tableau Error Image|https://ws3.sinaimg.cn/large/006tKfTcgy1ftfbzshgs1j30fc0g2dhi.jpg]

Besides, I found that the logs(2.3.1&2.4.0) are different from the logs(2.1.0), the logs(2.4.0)
are as below
{noformat}
Query Id: b160f20c-84e4-4b81-bfe9-54ed22a723d6
SQL: SELECT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV" AS "AV",
       COUNT(DISTINCT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."MC") AS "usr_Calculation_267682710052360192_ok"
FROM "ADL"."APP_DAILY_ACTIVE_USER_PROPERTY_DI" "APP_DAILY_ACTIVE_USER_PROPERTY_DI"
LEFT JOIN "DIM"."APP" "APP" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AC" = "APP"."ID")
INNER JOIN "DIM"."CALENDAR" "CALENDAR" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT"
= "CALENDAR"."CAL_DT")
WHERE ((CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) >= {fn TIMESTAMPADD(SQL_TSI_DAY,-29,{fn
CURRENT_DATE()})})
       AND (CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) < {fn TIMESTAMPADD(SQL_TSI_DAY,1,{fn
CURRENT_DATE()})})
       AND ("APP"."NAME" = 'xxx')
       AND ("APP"."PLATFORM" = 'Android'))
GROUP BY "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV"
User: ADMIN
Success: false
Duration: 0.029
Project: app
{noformat}


> {fn CURRENT_DATE()} parse error
> -------------------------------
>
>                 Key: KYLIN-3460
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3460
>             Project: Kylin
>          Issue Type: Bug
>          Components: Driver - ODBC
>    Affects Versions: v2.3.0, v2.3.1, v2.4.0
>            Reporter: Temple Zhou
>            Priority: Critical
>
> Dear all,
> I'm facing a very critical problem. When I use Tableau 10.5 with Kylin 2.1.0, the Tableau
Server will send many SQL with "{fn CURRENT_DATE()}"  via ODBC Driver, and the Kylin Server
2.1.0 will parse the CURRENT_DATE() to "2018-07-20 00:00:00"(the real current date). the logs
are as below
> {noformat}
> Query Id: 14e7b152-6be0-4539-8fd0-c28bbffa6b25
> SQL: SELECT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV" AS "AV",
>        COUNT(DISTINCT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."MC") AS "usr_Calculation_267682710052360192_ok"
> FROM "ADL"."APP_DAILY_ACTIVE_USER_PROPERTY_DI" "APP_DAILY_ACTIVE_USER_PROPERTY_DI"
> LEFT JOIN "DIM"."APP" "APP" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AC" = "APP"."ID")
> INNER JOIN "DIM"."CALENDAR" "CALENDAR" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT"
= "CALENDAR"."CAL_DT")
> WHERE ((CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) >= {ts
'2018-06-20 00:00:00'})
>        AND (CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) < {ts
'2018-07-20 00:00:00'})
>        AND ("APP"."NAME" = 'xxx'))
> GROUP BY "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV"
> User: ADMIN
> Success: true
> Duration: 0.06
> Project: app
> {noformat}
> However, recently, I upgrade my Kylin Server to 2.3.1 even 2.4.0, then there are many
Tableau reports get the same error due to the SQL contain {fn CURRENT_DATE()}
> [Tableau Error Image|https://ws3.sinaimg.cn/large/006tKfTcgy1ftfbzshgs1j30fc0g2dhi.jpg]
> Besides, I found that the logs(2.3.1&2.4.0) are different from the logs(2.1.0), the
logs(2.4.0) are as below
> {noformat}
> Query Id: b160f20c-84e4-4b81-bfe9-54ed22a723d6
> SQL: SELECT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV" AS "AV",
>        COUNT(DISTINCT "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."MC") AS "usr_Calculation_267682710052360192_ok"
> FROM "ADL"."APP_DAILY_ACTIVE_USER_PROPERTY_DI" "APP_DAILY_ACTIVE_USER_PROPERTY_DI"
> LEFT JOIN "DIM"."APP" "APP" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AC" = "APP"."ID")
> INNER JOIN "DIM"."CALENDAR" "CALENDAR" ON ("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT"
= "CALENDAR"."CAL_DT")
> WHERE ((CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) >= {fn
TIMESTAMPADD(SQL_TSI_DAY,-29,{fn CURRENT_DATE()})})
>        AND (CAST("APP_DAILY_ACTIVE_USER_PROPERTY_DI"."ACTION_DT" AS TIMESTAMP) < {fn
TIMESTAMPADD(SQL_TSI_DAY,1,{fn CURRENT_DATE()})})
>        AND ("APP"."NAME" = 'xxx')
>        AND ("APP"."PLATFORM" = 'Android'))
> GROUP BY "APP_DAILY_ACTIVE_USER_PROPERTY_DI"."AV"
> User: ADMIN
> Success: false
> Duration: 0.029
> Project: app
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message