首页 > 其他分享 >【Hive】FAILED: ParseException line 24:17 extraneous input ';' expecting EOF near '<

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

时间:2022-09-23 11:57:04浏览次数:78  
标签:24 comment code EOF 17 city id store string

在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)

标签:24,comment,code,EOF,17,city,id,store,string
From: https://www.cnblogs.com/144823836yj/p/16722217.html

相关文章

  • Split Into Two Sets CodeForces - 1702E
    SplitIntoTwoSetsCodeForces-1702EPolycarp有一副有n张牌的(数字n为偶数)多米诺骨牌.每张多米诺骨牌上写有两个在1到n之间的数字.请问能否把骨牌分成两......
  • 24 个必须掌握的数据库面试问题!
    一、为什么用自增列作为主键1、如果我们定义了主键(PRIMARYKEY),那么InnoDB会选择主键作为聚集索引。如果没有显式定义主键,则InnoDB会选择第一个不包含有NULL值的唯一索引......
  • 字典树-2416. 字符串的前缀分数和
    问题描述给你一个长度为n的数组words,该数组由非空字符串组成。定义字符串word的分数等于以word作为前缀的words[i]的数目。例如,如果words=["a","ab......
  • Pair of Topics CodeForces - 1324D
    PairofTopicsCodeForces-1324D你有两个长度为n的数列a和b。现在我们定义,若存在i和j,满足:(i<j)且(a[i]+a[j]>b[i]+b[j]),则我们称数对<i,j>为JNU数对你的目......
  • 9.16-17四则运算2
     packagetemomomomo;importjava.util.Random;importjava.util.Scanner;publicclasssizeyunsuan2{  staticScannerin=newScanner(System.in);//一定要......
  • CVE-2017-0143(永恒之蓝)漏洞复现By metasploit
    一、永恒之蓝介绍永恒之蓝是在Windows的SMB服务处理SMBv1请求时发生的漏洞,这个漏洞导致攻击者在目标系统上可以执行任意代码。通过永恒之蓝漏洞会扫描开放445文件共享端......
  • ABC 241E - Putting Candies(循环节:链+环)
    https://zhuanlan.zhihu.com/p/473078132这位大佬的E解释的非常清楚,强推E-PuttingCandieshttps://atcoder.jp/contests/abc241/tasks/abc241_e题目大意:给定一个......
  • ABC 241D - Sequence Query(multiset)
    newknowledge(stl)multiset位于库中,可以看成一个序列,插入一个数,删除一个数都可以在O(logn)的时间内完成,能时刻保证序列中的数是有序的,而且序列中可以存在重复的数。h......
  • ERROR 1776 (HY000): Parameters MASTER_LOG_FILE, MASTER_LOG_POS, RELAY_LOG_FILE a
    问题介绍:主库开始GTID,后来关闭了。做从库用的master_auto_position=1这种方法,然后报以下错误。root@localhost:(none)02:49:31>changemastertomaster_host='56.56.......
  • 1729D解题报告
    这是一题开错的题想法每次两个人去最优(莫名悲伤),其中一个预算大于实际花费,另一个随意理由如下如果两个人去花费超过了预算,此时添加第三个人(他的花费小于预算),那么那个要......