From issues-return-18706-archive-asf-public=cust-asf.ponee.io@kylin.apache.org Thu Jul 19 12:28:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E881918067A for ; Thu, 19 Jul 2018 12:28:04 +0200 (CEST) Received: (qmail 66044 invoked by uid 500); 19 Jul 2018 10:28:04 -0000 Mailing-List: contact issues-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list issues@kylin.apache.org Received: (qmail 66027 invoked by uid 99); 19 Jul 2018 10:28:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jul 2018 10:28:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9017F18067E for ; Thu, 19 Jul 2018 10:28:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.509 X-Spam-Level: X-Spam-Status: No, score=-109.509 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, UPPERCASE_50_75=0.791, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id EFvfHbTL7VRg for ; Thu, 19 Jul 2018 10:28:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 36D885F2A9 for ; Thu, 19 Jul 2018 10:28:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6CA91E02BE for ; Thu, 19 Jul 2018 10:28:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1BABF21EE2 for ; Thu, 19 Jul 2018 10:28:00 +0000 (UTC) Date: Thu, 19 Jul 2018 10:28:00 +0000 (UTC) From: "Temple Zhou (JIRA)" To: issues@kylin.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (KYLIN-3460) {fn CURRENT_DATE()} parse error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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} The problem that bothers me the most is that why the older version can parse the "fn CURRENT_DATE()" but the newer can't. :( :( :( 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} The problem that bothers me the most is that why the old version can parse the > {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} > The problem that bothers me the most is that why the older version can parse the "fn CURRENT_DATE()" but the newer can't. :( :( :( -- This message was sent by Atlassian JIRA (v7.6.3#76005)