felixYyu opened a new issue, #4603:
URL: https://github.com/apache/iceberg/issues/4603

   link #4289 and #4396
   
   - Test step in spark sql(v3.2.1) in Latest Master branch
   
   ```
   def testStep(spark: SparkSession): Unit = {
       spark.sql(
         s"""
            |
            |--INSERT INTO hadoop_prod.default.test_evolution5 VALUES (1, 11, 
21)
            |ALTER TABLE hadoop_prod.default.test_evolution5 ADD PARTITION 
FIELD col2
            |--INSERT INTO hadoop_prod.default.test_evolution5 VALUES (2, 12, 
22)
            |
            |--ALTER TABLE hadoop_prod.default.test_evolution5 DROP PARTITION 
FIELD col2
            |--INSERT INTO hadoop_prod.default.test_evolution5 VALUES (3, 13, 
23)
            |--ALTER TABLE hadoop_prod.default.test_evolution5 DROP COLUMN col2
            |""".stripMargin)
     }
   ```
   
   - exception log
   
   ```
   Exception in thread "main" 
org.apache.spark.sql.catalyst.parser.ParseException: 
   missing '(' at 'FIELD'(line 4, pos 62)
   
   == SQL ==
   
   
   --INSERT INTO hadoop_prod.default.test_evolution5 VALUES (1, 11, 21)
   ALTER TABLE hadoop_prod.default.test_evolution5 ADD PARTITION FIELD col2
   --------------------------------------------------------------^^^
   --INSERT INTO hadoop_prod.default.test_evolution5 VALUES (2, 12, 22)
   
   --ALTER TABLE hadoop_prod.default.test_evolution5 DROP PARTITION FIELD col2
   --INSERT INTO hadoop_prod.default.test_evolution5 VALUES (3, 13, 23)
   --ALTER TABLE hadoop_prod.default.test_evolution5 DROP COLUMN col2
   
        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:176)
        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