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 -------^^^


Solutions on the web11

Solution icon of stackoverflow
no viable alternative at input 'SELECT '(line 1, pos 7) == SQL == SELECT , FROM table ORDER BY ASC, DESC -------^^^

Solution icon of stackoverflow
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

Solution icon of stackoverflow
via Stack Overflow by SailingYang
, 11 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) -------------------------------^^^ at org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:197)

Solution icon of stackoverflow
via Stack Overflow by Sam-T
, 7 months ago
mismatched input 'FROM' expecting {<EOF>, 'WHERE', 'GROUP', 'ORDER', 'HAVING', 'LIMIT', 'LATERAL', 'WINDOW', 'UNION', 'EXCEPT', 'INTERSECT', 'SORT', 'CLUSTER', 'DISTRIBUTE'}(line 1, pos 14) == SQL == SELECT origin FROM origins WHERE origin like A* --------------^^^

Solution icon of github
DataType numeric() is not supported.(line 1, pos 103) == SQL == SELECT `carat`, `cut`, `color`, `clarity`, `depth`, `table`, `price`, `x`, `y`, `z`, CAST(`x` > 4.0 AS NUMERIC) AS `binary` -------------------------------------------------------------------------------------------------------^^^ FROM `diamonds`

Solution icon of github
CREATE TEMPORARY TABLE is not supported yet. Please use CREATE TEMPORARY VIEW as an alternative.(line 1, pos 0) == SQL == CREATE TEMPORARY TABLE `rnprrlqxwk` (`t` INTEGER, `name` STRING) ^^^

Solution icon of stackoverflow
via Stack Overflow by user3792699
, 5 months ago
Operation not allowed: msck repair table(line 1, pos 0) == SQL == msck repair table table_name ^^^

Solution icon of stackoverflow
Operation not allowed: delete from(line 1, pos 0) == SQL == delete from test where id= 1 ^^^

Solution icon of stackoverflow
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)) ^^^

Solution icon of stackoverflow
via Stack Overflow by John Doe
, 9 months ago
extraneous input '' expecting {'(', 'SELECT', .. == SQL == IncidntNum is not null ^^^

Stack trace

  • 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.execution.SparkSqlParser.parse(SparkSqlParser.scala:45) at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:53) at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:592)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 5 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
3 more bugmates