org.apache.spark.sql.catalyst.parser.ParseException: 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)

Stack Overflow | SailingYang | 3 months ago
  1. 0

    spark-sql parse sql insert into error

    Stack Overflow | 3 months ago | SailingYang
    org.apache.spark.sql.catalyst.parser.ParseException: 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)
  2. 0

    cannot cast columns to `numeric` on creation

    GitHub | 6 months ago | kevinushey
    org.apache.spark.sql.catalyst.parser.ParseException: 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`
  3. 0

    Select not null values in dataframes in Spark

    Stack Overflow | 3 weeks ago | John Doe
    org.apache.spark.sql.catalyst.parser.ParseException: extraneous input '' expecting {'(', 'SELECT', .. == SQL == IncidntNum is not null ^^^
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    *_join(..., copy = T) doesn't work

    GitHub | 3 months ago | kjedrzejewski
    org.apache.spark.sql.catalyst.parser.ParseException: 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) ^^^

Root Cause Analysis

  1. org.apache.spark.sql.catalyst.parser.ParseException

    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)

    at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse()
  2. org.apache.spark
    AbstractSqlParser.parse
    1. org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:99)
    1 frame
  3. Spark Project SQL
    SparkSqlParser.parse
    1. org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:46)
    1 frame
  4. org.apache.spark
    AbstractSqlParser.parsePlan
    1. org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:53)
    1 frame
  5. Spark Project SQL
    SparkSession.sql
    1. org.apache.spark.sql.SparkSession.sql(SparkSession.scala:582)
    1 frame
  6. Unknown
    Test.main
    1. Test$.main(Test.scala:32)
    2. Test.main(Test.scala)
    2 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  8. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
    1 frame