jinchengchenghh opened a new issue #3374:
URL: https://github.com/apache/iceberg/issues/3374


   if update the spec, remove the partition field, then cannot query files, and 
rewrite data files, expire snapshots will also raise exception
   
   `create table iceberg_catalog.db.bucket2(a string, b string, c string) using 
iceberg partitioned by (bucket(2, b), bucket(2, c)) location 
"/Users/jcc/hive/bucket2";
   insert into db.bucket2 values("1", "cc", "bb");
   insert into db.bucket2 values("1", "cc", "bb");
   alter table iceberg_catalog.db.bucket2 drop partition field bucket(2, c);
   insert into db.bucket2 values("1", "cc", "bb");
   insert into db.bucket2 values("1", "cc", "bb");
   select * from iceberg_catalog.db.bucket2.files;`
   
   _Exception is_
   Caused by: java.lang.IllegalArgumentException: Wrong class, 
java.lang.CharSequence, for object: 1
           at org.apache.iceberg.PartitionData.get(PartitionData.java:120)
           at 
org.apache.iceberg.spark.source.StructInternalRow.getUTF8StringInternal(StructInternalRow.java:175)
           at 
org.apache.iceberg.spark.source.StructInternalRow.getUTF8String(StructInternalRow.java:171)
           at 
org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown
 Source)
           at 
org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
           at 
org.apache.spark.sql.execution.WholeStageCodegenExec$$anon$1.hasNext(WholeStageCodegenExec.scala:729)
           at 
org.apache.spark.sql.execution.SparkPlan.$anonfun$getByteArrayRdd$1(SparkPlan.scala:340)
           at 
org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2(RDD.scala:872)
           at 
org.apache.spark.rdd.RDD.$anonfun$mapPartitionsInternal$2$adapted(RDD.scala:872)
           at 
org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
           at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:349)
           at org.apache.spark.rdd.RDD.iterator(RDD.scala:313)
           at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
           at org.apache.spark.scheduler.Task.run(Task.scala:127)
           at 
org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:446)
           at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1377)
           at 
org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:449)
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
           at java.lang.Thread.run(Thread.java:748)


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