You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "MonkeyCanCode (via GitHub)" <gi...@apache.org> on 2025/04/29 04:44:51 UTC
[PR] Additional refs update for iceberg 1.9.0 [polaris]
MonkeyCanCode opened a new pull request, #1491:
URL: https://github.com/apache/polaris/pull/1491
Additional refs for iceberg based on PR: https://github.com/apache/polaris/pull/1309
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2849031945
@adutra @dimas-b This is fixed by explicitly shade avro dependency.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2848248974
> Spark 3.5 + Iceberg 1.9.0 worked fine for me when started locally:
>
> ```
> bin/spark-sql \
> --packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.9.0 \
> --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
> --conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
> --conf spark.sql.catalog.polaris.type=rest \
> --conf spark.sql.catalog.polaris.uri=http://localhost:8181/api/catalog \
> --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
> --conf spark.sql.catalog.polaris.warehouse=polaris \
> --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
> --conf spark.sql.catalog.polaris.credential=***
> ```
>
> ```
> spark-sql (ns)> create table t1 as select 'abc';
> Time taken: 2.563 seconds
> spark-sql (ns)> select * from t1;
> abc
> Time taken: 0.81 seconds, Fetched 1 row(s)
> spark-sql (ns)> insert into t1 values ('a'), ('b');
> Time taken: 0.34 seconds
> spark-sql (ns)> select * from t1;
> abc
> a
> b
> Time taken: 0.178 seconds, Fetched 3 row(s)
> ```
The issue is from the custom spark catalog (polaris spark catalog for delta)
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2846039228
Spark 3.5 + Iceberg 1.9.0 worked fine for me when started locally:
```
bin/spark-sql \
--packages org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.9.0 \
--conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
--conf spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
--conf spark.sql.catalog.polaris.type=rest \
--conf spark.sql.catalog.polaris.uri=http://localhost:8181/api/catalog \
--conf spark.sql.catalog.polaris.token-refresh-enabled=false \
--conf spark.sql.catalog.polaris.warehouse=polaris \
--conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
--conf spark.sql.catalog.polaris.credential=***
```
```
spark-sql (ns)> create table t1 as select 'abc';
Time taken: 2.563 seconds
spark-sql (ns)> select * from t1;
abc
Time taken: 0.81 seconds, Fetched 1 row(s)
spark-sql (ns)> insert into t1 values ('a'), ('b');
Time taken: 0.34 seconds
spark-sql (ns)> select * from t1;
abc
a
b
Time taken: 0.178 seconds, Fetched 3 row(s)
```
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2848250412
> I am 80% convinced that the issue is with Avro. When I SSH into a running `regtest` container and execute the test manually, I also get the same error. Here is the full stack trace:
>
> ```
> 25/05/02 19:41:43 ERROR Utils: Aborting task
> java.lang.NoClassDefFoundError: Could not initialize class org.apache.iceberg.GenericDataFile
> at org.apache.iceberg.DataFiles$Builder.build(DataFiles.java:335)
> at org.apache.iceberg.io.DataWriter.close(DataWriter.java:93)
> at org.apache.iceberg.io.RollingFileWriter.closeCurrentWriter(RollingFileWriter.java:122)
> at org.apache.iceberg.io.RollingFileWriter.close(RollingFileWriter.java:147)
> at org.apache.iceberg.io.RollingDataWriter.close(RollingDataWriter.java:32)
> at org.apache.iceberg.spark.source.SparkWrite$UnpartitionedDataWriter.close(SparkWrite.java:747)
> at org.apache.iceberg.spark.source.SparkWrite$UnpartitionedDataWriter.commit(SparkWrite.java:729)
> at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.$anonfun$run$5(WriteToDataSourceV2Exec.scala:475)
> at org.apache.spark.util.Utils$.tryWithSafeFinallyAndFailureCallbacks(Utils.scala:1397)
> at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run(WriteToDataSourceV2Exec.scala:491)
> at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run$(WriteToDataSourceV2Exec.scala:430)
> at org.apache.spark.sql.execution.datasources.v2.DataWritingSparkTask$.run(WriteToDataSourceV2Exec.scala:496)
> at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.$anonfun$writeWithV2$2(WriteToDataSourceV2Exec.scala:393)
> at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:93)
> at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:166)
> at org.apache.spark.scheduler.Task.run(Task.scala:141)
> at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$4(Executor.scala:620)
> at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally(SparkErrorUtils.scala:64)
> at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally$(SparkErrorUtils.scala:61)
> at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:94)
> at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:623)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> at java.base/java.lang.Thread.run(Thread.java:840)
> Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchMethodError: 'org.apache.avro.LogicalTypes$TimestampNanos org.apache.avro.LogicalTypes.timestampNanos()' [in thread "Executor task launch worker for task 1.0 in stage 0.0 (TID 1)"]
> at org.apache.iceberg.avro.TypeToSchema.<clinit>(TypeToSchema.java:50)
> at org.apache.iceberg.avro.AvroSchemaUtil.convert(AvroSchemaUtil.java:76)
> at org.apache.iceberg.avro.AvroSchemaUtil.convert(AvroSchemaUtil.java:72)
> at org.apache.iceberg.PartitionData.partitionDataSchema(PartitionData.java:42)
> at org.apache.iceberg.PartitionData.<init>(PartitionData.java:71)
> at org.apache.iceberg.BaseFile$1.<init>(BaseFile.java:51)
> at org.apache.iceberg.BaseFile.<clinit>(BaseFile.java:50)
> ... 24 more
> ```
>
> I just don't understand yet why the stack trace is not printed in the stdout file.
I am not seeing this error...from the testing i did couple days back, this is due to the custom polaris spark catalog is not compatible with iceberg 1.9.0 (bump up the version for runtime and the jar compiled with no issue but not use-able). I will add more debug info this weekend. A bit busy during workday lately.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode merged PR #1491:
URL: https://github.com/apache/polaris/pull/1491
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2847921449
I can reproduce the regtest failure using docker-compose, but I don't understand the issue yet.
When I try to reproduce locally, I am currently getting:
```
25/05/02 16:14:04 ERROR Utils: Aborting task
java.lang.NoSuchMethodError: 'org.apache.avro.LogicalTypes$TimestampNanos org.apache.avro.LogicalTypes.timestampNanos()'
at org.apache.iceberg.avro.TypeToSchema.<clinit>(TypeToSchema.java:50)
at org.apache.iceberg.avro.AvroSchemaUtil.convert(AvroSchemaUtil.java:76)
at org.apache.iceberg.avro.AvroSchemaUtil.convert(AvroSchemaUtil.java:72)
at org.apache.iceberg.PartitionData.partitionDataSchema(PartitionData.java:42)
```
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2843983230
> @adutra seem to be a defective when actually changed client jar from 1.8.1 to 1.9.0 for spark:
>
> ```
> ➜ polaris git:(iceberg_1.9.0) ✗ diff /tmp/polaris-spark-regtests/spark_sql_3.5_2.12/spark_sql.stdout /Users/yong/Desktop/GitHome/polaris/plugins/spark/v3.5/regtests/spark_sql.ref
> 21a22,24
> > 111
> > 123
> > 234
> ```
>
> Here is the local output for the above diff:
>
> ```
> spark-sql (db1.schema1)> insert into iceberg_tb values (123), (234), (111);
> spark-sql (db1.schema1)> select * from iceberg_tb order by col1;
> spark-sql (db1.schema1)>
> ```
>
> Somehow the select return no row back (while the expected output as well as SQL suggested we should have this):
>
> ```
> spark-sql (db1.schema1)> insert into iceberg_tb values (123), (234), (111);
> spark-sql (db1.schema1)> select * from iceberg_tb order by col1;
> 111
> 123
> 234
> ```
>
> I can take a closer look tomorrow and do a local testing for this.
@adutra / @gh-yzou so this is due to the custom client jar only works with 1.8.1 and not 1.9.0. The above is failing as I tried to update iceberg dependency to match to what Alex checked in couple days back. I got confused for a bit until I saw "org.apache.polaris.spark.SparkCatalog" in the config. Seems like some code change will be need before we can bump the version here.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2837794961
@adutra seem to be a defective when actually changed client jar from 1.8.1 to 1.9.0 for spark:
```
➜ polaris git:(iceberg_1.9.0) ✗ diff /tmp/polaris-spark-regtests/spark_sql_3.5_2.12/spark_sql.stdout /Users/yong/Desktop/GitHome/polaris/plugins/spark/v3.5/regtests/spark_sql.ref
21a22,24
> 111
> 123
> 234
```
Here is the local output for the above diff:
```
spark-sql (db1.schema1)> insert into iceberg_tb values (123), (234), (111);
spark-sql (db1.schema1)> select * from iceberg_tb order by col1;
spark-sql (db1.schema1)>
```
Somehow the select return no row back (while the expected output as well as SQL suggested we should have this):
```
spark-sql (db1.schema1)> insert into iceberg_tb values (123), (234), (111);
spark-sql (db1.schema1)> select * from iceberg_tb order by col1;
111
123
234
```
I can take a closer look tomorrow and do a local testing for this.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Additional refs update for iceberg 1.9.0 [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #1491:
URL: https://github.com/apache/polaris/pull/1491#issuecomment-2847989195
I am 80% convinced that the issue is with Avro. When I SSH into a running `regtest` container and execute the test manually, I also get the same error. Here is the full stack trace:
```
25/05/02 19:41:43 ERROR Utils: Aborting task
java.lang.NoClassDefFoundError: Could not initialize class org.apache.iceberg.GenericDataFile
at org.apache.iceberg.DataFiles$Builder.build(DataFiles.java:335)
at org.apache.iceberg.io.DataWriter.close(DataWriter.java:93)
at org.apache.iceberg.io.RollingFileWriter.closeCurrentWriter(RollingFileWriter.java:122)
at org.apache.iceberg.io.RollingFileWriter.close(RollingFileWriter.java:147)
at org.apache.iceberg.io.RollingDataWriter.close(RollingDataWriter.java:32)
at org.apache.iceberg.spark.source.SparkWrite$UnpartitionedDataWriter.close(SparkWrite.java:747)
at org.apache.iceberg.spark.source.SparkWrite$UnpartitionedDataWriter.commit(SparkWrite.java:729)
at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.$anonfun$run$5(WriteToDataSourceV2Exec.scala:475)
at org.apache.spark.util.Utils$.tryWithSafeFinallyAndFailureCallbacks(Utils.scala:1397)
at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run(WriteToDataSourceV2Exec.scala:491)
at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run$(WriteToDataSourceV2Exec.scala:430)
at org.apache.spark.sql.execution.datasources.v2.DataWritingSparkTask$.run(WriteToDataSourceV2Exec.scala:496)
at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.$anonfun$writeWithV2$2(WriteToDataSourceV2Exec.scala:393)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:93)
at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:166)
at org.apache.spark.scheduler.Task.run(Task.scala:141)
at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$4(Executor.scala:620)
at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally(SparkErrorUtils.scala:64)
at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally$(SparkErrorUtils.scala:61)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:94)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:623)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchMethodError: 'org.apache.avro.LogicalTypes$TimestampNanos org.apache.avro.LogicalTypes.timestampNanos()' [in thread "Executor task launch worker for task 1.0 in stage 0.0 (TID 1)"]
at org.apache.iceberg.avro.TypeToSchema.<clinit>(TypeToSchema.java:50)
at org.apache.iceberg.avro.AvroSchemaUtil.convert(AvroSchemaUtil.java:76)
at org.apache.iceberg.avro.AvroSchemaUtil.convert(AvroSchemaUtil.java:72)
at org.apache.iceberg.PartitionData.partitionDataSchema(PartitionData.java:42)
at org.apache.iceberg.PartitionData.<init>(PartitionData.java:71)
at org.apache.iceberg.BaseFile$1.<init>(BaseFile.java:51)
at org.apache.iceberg.BaseFile.<clinit>(BaseFile.java:50)
... 24 more
```
I just don't understand yet why the stack trace is not printed in the stdout file.
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org