我是靠谱客的博主 鲜艳白昼,最近开发中收集的这篇文章主要介绍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建表时报错
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即可
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: Error while compiling statement: FAILED: ParseException line 1:28 mismatched input ‘,‘ expect所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复