我是靠谱客的博主 鲜艳白昼,这篇文章主要介绍Error: Error while compiling statement: FAILED: ParseException line 1:28 mismatched input ‘,‘ expect,现在分享给大家,希望可以做个参考。

Error: Error while compiling statement: FAILED: ParseException line 1:28 mismatched input ‘,’ expecting ( near ‘char’ in primitive type specification (state=42000,code=40000)

hive建表时报错

复制代码
1
2
3
0: jdbc:hive2://linux01:10000> create table score(name char,`month` String,money int)row format delimited fields terminated by ','stored as textfile; Error: Error while compiling statement: FAILED: ParseException line 1:28 mismatched input ',' expecting ( near 'char' in primitive type specification (state=42000,code=40000)

原因:hive中没有char类型,把char换成string即可

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
char' in primitive type specification (state=42000,code=40000) 0: jdbc:hive2://linux01:10000> create table score(name String,mh String,money int) . . . . . . . . . . . . . . .> row format delimited fields terminated by ',' stored as textfile; INFO : Compiling command(queryId=root_20210228101547_c8d756b9-d220-4df5-96ae-29902db735d4): create table score(name String,mh String,money int) row format delimited fields terminated by ',' stored as textfile INFO : Concurrency mode is disabled, not creating a lock manager INFO : Semantic Analysis Completed (retrial = false) INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null) INFO : Completed compiling command(queryId=root_20210228101547_c8d756b9-d220-4df5-96ae-29902db735d4); Time taken: 0.101 seconds INFO : Concurrency mode is disabled, not creating a lock manager INFO : Executing command(queryId=root_20210228101547_c8d756b9-d220-4df5-96ae-29902db735d4): create table score(name String,mh String,money int) row format delimited fields terminated by ',' stored as textfile INFO : Starting task [Stage-0:DDL] in serial mode INFO : Completed executing command(queryId=root_20210228101547_c8d756b9-d220-4df5-96ae-29902db735d4); Time taken: 0.652 seconds INFO : OK INFO : Concurrency mode is disabled, not creating a lock manager No rows affected (0.776 seconds)

最后

以上就是鲜艳白昼最近收集整理的关于Error: Error while compiling statement: FAILED: ParseException line 1:28 mismatched input ‘,‘ expect的全部内容,更多相关Error:内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部