【Hive】FAILED: ParseException line 24:17 extraneous input ';' expecting EOF near '<EOF>'

在hive命令中执行如下DDL

复制代码
CREATE  TABLE store_test
(
    id                      bigint comment "PK",
    store_name_cn           string comment "store name",
    store_id                string comment "store id",
    store_activation_status smallint comment "store status(1-activate 2-forbidden)",
    country                 string comment "store country",
    province                string comment "store province",
    province_code           string comment "stores'province code",
    city                    string comment "store city",
    city_code               string comment "store's city code",
    address                 string comment "store address",
    telephone               string comment "store's telephone",
    postal_code             string comment "store's postal code",
    longitude               decimal(10, 7) comment "store's longitude",
    latitude                decimal(10, 7) comment "store's latitude",
    city_flagship           string comment "is the city flagship",
    national_flagship       string comment "is the national flagship",
    store_sort              smallint comment "the position of store",
    dept_id                 bigint comment "the department id",
    store_number           string comment "dkts poslo'g store number"
) comment "store"
    partitioned by (pt string)
    STORED AS ORC;
复制代码

 

出现报错:

FAILED: ParseException line 24:17 extraneous input ';' expecting EOF near '<EOF>'

通过逐渐删减字段,定位到了问题原因是单引号 的数量为奇数(是有点奇怪...)

 

 解决办法:

   对单引号进行转义

 

参考:

Escaped single quote in COMMENT is not handled properly · Issue #63 · xnuinside/simple-ddl-parser (github.com)

posted @   梦醒江南·Infinite  阅读(1247)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
历史上的今天:
2021-09-23 【Git】拉取远程分支
2020-09-23 Spark DataFrame NOT IN实现方法
点击右上角即可分享
微信分享提示