Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] postgresql 的 CURRENT_DATE 解析错误 #6133

Open
DimonHo opened this issue Sep 18, 2024 · 0 comments
Open

[BUG] postgresql 的 CURRENT_DATE 解析错误 #6133

DimonHo opened this issue Sep 18, 2024 · 0 comments

Comments

@DimonHo
Copy link

DimonHo commented Sep 18, 2024

Database Type

hologres

Database Version

hologres

Druid Version

1.2.23

JDK Version

1.8

Error SQL

String sqlText = "select TO_CHAR(CURRENT_DATE - INTERVAL '1 day', 'YYYYMMDD') from tableName;"
String template = ParameterizedOutputVisitorUtils.parameterize(sqlText, DbType.postgresql, VISITOR_FEATURES);

Testcase Code

解析template的结果:

SELECT TO_CHAR("CURRENT_DATE" - INTERVAL ?, ?) FROM "tableName";

Stacktrace Info

无错误信息

Error Info

CURRENT_DATE 作为关键字,解析后不应该加双引号

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant