You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Method from JDK 10 not found while using clickhouse-jdbc in Spark application, running on JDK 8 #2816
Just another note about running on Spark 3, JDK 8: spark dustribution depend on older version of guava - guava-27.0-jre.jar.
The clickhouse-java uses just few methods from this library newer version, e.g. ImmutableMap.builder.buildKeepingLast in com.clickhouse.client.api.metadata.TableSchema (there is a user suggestion to get rid of guava at all :) )
So clickhouse-java version 0.9.x usage still impossible on Spark 3, JDK 8 - exception due to buildKeepingLast is missing. Using newer guava as a classpath library with user's spark job is dangerous, cause Spark itself rely on older version.
I'd like to suggest a change - incorporate a method from recent guava into clickhouse-java, this way clickhouse-java could rely/depend on guava 27 and would be capable to run on Spark 3, JDK8.
The method to borrow is ImmutableMap#lastEntryForEachKey, the changed TableSchema is attached
Activity
chernser commentedon Apr 1, 2026
@ejolos
Thank you for reporting!
Will look into it shortly.
dolfinus commentedon Apr 15, 2026
Fix: #2821
chernser commentedon Apr 15, 2026
Thank you, @dolfinus !
ejolos commentedon Apr 17, 2026
Great thank you!
Just another note about running on Spark 3, JDK 8: spark dustribution depend on older version of guava - guava-27.0-jre.jar.
The clickhouse-java uses just few methods from this library newer version, e.g. ImmutableMap.builder.buildKeepingLast in com.clickhouse.client.api.metadata.TableSchema (there is a user suggestion to get rid of guava at all :) )
So clickhouse-java version 0.9.x usage still impossible on Spark 3, JDK 8 - exception due to buildKeepingLast is missing. Using newer guava as a classpath library with user's spark job is dangerous, cause Spark itself rely on older version.
I'd like to suggest a change - incorporate a method from recent guava into clickhouse-java, this way clickhouse-java could rely/depend on guava 27 and would be capable to run on Spark 3, JDK8.
The method to borrow is ImmutableMap#lastEntryForEachKey, the changed TableSchema is attached
TableSchema.java
chernser commentedon Apr 17, 2026
@ejolos
Thank you for the info!
We will look into it shortly - issue #2831.
Have you tried shaded version with
-allqualifier? This should have no clash in dependencies.ejolos commentedon Apr 17, 2026
no, didn't tried shaded version before current issue 2816 has been resolved,
will definitely try later on! (it would be 0.9.9 I understand)
thank you