felixYyu commented on issue #4603:
URL: https://github.com/apache/iceberg/issues/4603#issuecomment-1105869035

   the following also don't work, exception log is:
   ```
   spark.sql(
         s"""
            | CREATE TABLE tbl(id bigint, data string) using parquet;
            | INSERT INTO tbl VALUES (0, 'kyle');
            |""".stripMargin
   ```
   
   ```
   Exception in thread "main" 
org.apache.spark.sql.catalyst.parser.ParseException: 
   extraneous input 'INSERT' expecting {<EOF>, ';'}(line 3, pos 1)
   
   == SQL ==
   
    CREATE TABLE tbl(id bigint, data string) using parquet;
    INSERT INTO tbl VALUES (0, 'kyle');
   -^^^
   
        at 
org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:266)
        at 
org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:127)
        at 
org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:51)
        at 
org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:77)
        at 
org.apache.spark.sql.catalyst.parser.extensions.IcebergSparkSqlExtensionsParser.parsePlan(IcebergSparkSqlExtensionsParser.scala:123)
        at 
org.apache.spark.sql.SparkSession.$anonfun$sql$2(SparkSession.scala:616)
        at 
org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
        at 
org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:616)
        at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)
        at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:613)
        at 
com.jiuye.data.lake.api.modle.DDLPartitionSQL$.testStep(DDLPartitionSQL.scala:188)
        at 
com.jiuye.data.lake.api.modle.DDLPartitionSQL$.main(DDLPartitionSQL.scala:44)
        at 
com.jiuye.data.lake.api.modle.DDLPartitionSQL.main(DDLPartitionSQL.scala)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to