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)
版权声明:本文为weixin_45140946原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。