clarkyu2016 / sql-beautify

VS Code extension that beautifies SQL(HQL).
MIT License
60 stars 21 forks source link

DDL中表名带有特定关键字时会出现错误 #39

Closed YouboFAN closed 2 years ago

YouboFAN commented 2 years ago

DDL建表语句 表名带有特定关键字时会出现格式化错误 原DDL

CREATE TABLE a.tmp_interact (
    `uid` bigint COMMENT "uid",
    `label` bigint COMMENT "标签"
) COMMENT "sample table" partitioned by (`pt` STRING);

格式化后出现问题

 CREATE  TABLE  COMMENT undefined
,`uid`   bigint COMMENT  "uid"
,`label` bigint COMMENT  "标签"

) COMMENT "sample table" PARTITIONED by (pt STRING); 将表名中的int替换成其他比如it,再格式化后正常

CREATE TABLE a.tmp_iteract (
     `uid`   bigint COMMENT  "uid"
    ,`label` bigint COMMENT  "标签"
) COMMENT "sample table" PARTITIONED by (`pt` STRING);

目前尝试了一下int、float都会引发此错误

clarkyu2016 commented 2 years ago

新版本0.3.13已经修复,感谢您的反馈!