running-elephant/datart

Sql parse bug

huang1101 opened this issue · 0 comments

version: dev
SQL:SELECT * FROM ( SELECT d_date, SUM(COALESCE(totals.cumulative_amount, 0)) AS cumulative_amount FROM (SELECT DATE(d_date) AS d_date, SUM(pay_amount) AS cumulative_amount FROM pdd_products_rank WHERE d_date BETWEEN $公共时间1$ AND $公共时间2$ GROUP BY d_date ) AS totals LEFT JOIN (SELECT DATE(d_date) AS date, COUNT(*) AS day_count FROM pdd_products_rank WHERE d_date BETWEEN $公共时间1$ AND $公共时间2$ GROUP BY DATE(d_date) ) AS days ON totals.d_date = days.date WHERE days.day_count GROUP BY d_date ORDER BY d_date ) AS DATART_VTABLE LIMIT 1000 OFFSET 0
DB: MYSQL
EXCEPTION:org.apache.calcite.sql.parser.SqlParseException: Encountered "date" at line 1, column 369.
Was expecting one of:
<QUOTED_STRING> ...
<BRACKET_QUOTED_IDENTIFIER> ...
<QUOTED_IDENTIFIER> ...
<BACK_QUOTED_IDENTIFIER> ...
<HYPHENATED_IDENTIFIER> ...
...
<UNICODE_QUOTED_IDENTIFIER> ...