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] 解析hive时如果 PARTITIONED BY 和 LOCATION 关键字之间有COMMENT解析失败 #6071

Open
yeyeyuanyu opened this issue Aug 1, 2024 · 3 comments

Comments

@yeyeyuanyu
Copy link

Database Type

hivi

Database Version

Druid Version

1.2.23

JDK Version

jdk8

Error SQL

CREATE TABLE IF NOT EXISTS test.dwr_whs_invt_dtl(
bat_no string COMMENT '批号',
.................................................
)
USING hudi
PARTITIONED BY (acct_prd string comment '会计期')
COMMENT '明细表'
LOCATION 'obs://xxxxxxxxxxxxxxxxxx'
TBLPROPERTIES (
type = 'mor',
primaryKey = 'acct_prd' ,
preCombineField = 'acct_prd'
);

Testcase Code

No response

Stacktrace Info

No response

Error Info

No response

@yeyeyuanyu
Copy link
Author

Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: not supported.pos 973, line 27, column 82, token IDENTIFIER LOCATION
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:654)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:600)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:621)

@yeyeyuanyu
Copy link
Author

CREATE TABLE IF NOT EXISTS
dwi.dwi_wms_addr (
.............................................
dwi_last_ins_time STRING COMMENT 'DWI数据插入时间',
dwi_last_upd_time STRING COMMENT 'DWI数据更新时间'
) USING hudi COMMENT '货位表' LOCATION 'obs://xxxxxxxxxxxxxxxxxxxxxxx' ---HUDI表存储路径
OPTIONS (
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
);
还有可能无法解析options
Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: not supported.pos 2578, line 70, column 2, token IDENTIFIER OPTIONS
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:654)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:600)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:621)

@yeyeyuanyu
Copy link
Author

PARTITIONED BY 在 LOCATION 后面也会失败

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