itaise commented on issue #4510:
URL: https://github.com/apache/iceberg/issues/4510#issuecomment-1177506225
Thank you @rdblue - I tried your suggestion but unfortunately getting
another error, I added the following just before the table overwrite and it
didn't help:
`spark.sql(f"""ALTER TABLE iprod.test_schema.example SET TBLPROPERTIES
('format-version' = '2')""")`
as mentioned in the Tabular article:
https://tabular.io/blog/iceberg-format-version/
and getting this error:
`Caused by: java.lang.NullPointerException: Cannot find source column: 1
at
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:953)
at org.apache.iceberg.PartitionSpec$Builder.add(PartitionSpec.java:490)
at
org.apache.iceberg.PartitionSpecParser.buildFromJsonFields(PartitionSpecParser.java:155)
at
org.apache.iceberg.PartitionSpecParser.fromJson(PartitionSpecParser.java:78)
at
org.apache.iceberg.PartitionSpecParser.lambda$fromJson$0(PartitionSpecParser.java:91)
at
org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2344)
at
java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)
at
org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2342)
at
org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2325)
at
org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
at
org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)
at
org.apache.iceberg.PartitionSpecParser.fromJson(PartitionSpecParser.java:88)
at
org.apache.iceberg.SerializableTable.lambda$specs$2(SerializableTable.java:186)
at java.util.HashMap.forEach(HashMap.java:1290)
at
org.apache.iceberg.SerializableTable.specs(SerializableTable.java:185)
at org.apache.iceberg.SerializableTable.spec(SerializableTable.java:175)
at
org.apache.iceberg.io.OutputFileFactory$Builder.<init>(OutputFileFactory.java:152)
at
org.apache.iceberg.io.OutputFileFactory$Builder.<init>(OutputFileFactory.java:140)
at
org.apache.iceberg.io.OutputFileFactory.builderFor(OutputFileFactory.java:108)
at
org.apache.iceberg.spark.source.SparkWrite$WriterFactory.createWriter(SparkWrite.java:542)
at
org.apache.iceberg.spark.source.SparkWrite$WriterFactory.createWriter(SparkWrite.java:535)
at
org.apache.spark.sql.execution.datasources.v2.DataWritingSparkTask$.run(WriteToDataSourceV2Exec.scala:408)
at
org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.$anonfun$writeWithV2$2(WriteToDataSourceV2Exec.scala:360)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
at org.apache.spark.scheduler.Task.run(Task.scala:131)
at
org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)`
--
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]