org.apache.spark.sql.catalyst.parser.ParseException: no viable alternative at input 'SELECT 年'(line 1, pos 7) == SQL == SELECT 年龄 , 姓名 FROM table ORDER BY 年龄 ASC, 姓名 DESC -------^^^

Hot problem!
This exception has a lot of traffic. You can help 13 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Unknown author, 9 months ago
no viable alternative at input 'SELECT '(line 1, pos 7) == SQL == SELECT , FROM table ORDER BY ASC, DESC -------^^^
via Stack Overflow by Akrem
, 2 months ago
extraneous input '.' expecting {<EOF>, ',', 'SELECT', 'FROM', 'ADD', 'AS', 'ALL', 'DISTINCT', 'WHERE', 'GROUP', 'BY', 'GROUPING', 'SETS', 'CUBE', 'ROLLUP', 'ORDER', 'HAVING', 'LIMIT', 'AT', 'OR', 'AND', 'IN', NOT, 'NO', 'EXISTS', 'BETWEEN', 'LIKE
via Stack Overflow by addmeaning
, 7 months ago
mismatched input 'create' expecting (line 3, pos 0) == SQL == create table if not exists temp2(Col varchar(32)) create table if not exists temp3(Col varchar(32)) ^^^
via Stack Overflow by Vignesh
, 2 months ago
no viable alternative at input 'SELECT @'(line 1, pos 7) == SQL == SELECT @row_number:=@row_number+1 as rowid,d. FROM destination d, (SELECT @row_number:=0) as init -------^^^
via Stack Overflow by Brent Dorsey
, 10 months ago
extraneous input ''' expecting {'(', 'SELECT', 'FROM', 'ADD', 'AS', 'ALL', 'DISTINCT', 'WHERE', 'GROUP', 'BY', 'GROUPING', 'SETS', 'CUBE', 'ROLLUP', 'ORDER', 'HAVING', 'LIMIT', 'AT', 'OR', 'AND', 'IN', NOT, 'NO', 'EXISTS', 'BETWEEN', 'LIKE', RLIKE
via Stack Overflow by SailingYang
, 3 months ago
mismatched input 'idx' expecting {'(', 'SELECT', 'FROM', 'VALUES', 'TABLE', 'INSERT', 'MAP', 'REDUCE'}(line 1, pos 31) == SQL == insert into TABLE parquetFile (idx, name, age) values (200, "hello", 78) -------------------------------^^^
org.apache.spark.sql.catalyst.parser.ParseException: no viable alternative at input 'SELECT 年'(line 1, pos 7) == SQL == SELECT 年龄 , 姓名 FROM table ORDER BY 年龄 ASC, 姓名 DESC -------^^^
at org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:197)
at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:99)
at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:53)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:592)

Users with the same issue

Once, 8 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 4 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.