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] #6297

Open
xy13554355453 opened this issue Dec 19, 2024 · 1 comment
Open

[BUG] #6297

xy13554355453 opened this issue Dec 19, 2024 · 1 comment

Comments

@xy13554355453
Copy link

Database Type

Presto or Trino

Database Version

Trino 3.22

Druid Version

1.2.23

JDK Version

OpenJDK 8

Error SQL

select
order_id as "订单编号",
channel_name as "渠道名称",
if(book_timestamp = '', null, book_timestamp) as "订单日期",
product_status_name as "产品状态名称",
product_abnormal_status as "产品异常状态",
contact_name as "联系人姓名",
contact_mobile_num as "联系人手机号码",
contact_email as "联系人邮箱",
product_id as "产品ID",
split(flight_type, '-')[1] as "航线类型CODE",
from
dm_product.dm_product_groundtransport_bus_detail_s_d

Testcase Code

No response

Stacktrace Info

No response

Error Info

Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: not supported.pos 329, line 11, column 27, token [
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:654)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:106)
at com.alibaba.druid.sql.SQLUtils.parseSingleStatement(SQLUtils.java:626)
at com.ganyaix.demo.sql.utils.SQLLineageParse.parse(SQLLineageParse.java:51)
at com.ganyaix.demo.sql.utils.SQLLineageParse.main(SQLLineageParse.java:40)

split(flight_type, '-')[1] as "航线类型CODE", 数组语法不支持 实际场景中使用 presto(trino)查询 hive 是都可以使用这种语法

@xy13554355453
Copy link
Author

解析 sql 无法成功

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