This is an automated email from the ASF dual-hosted git repository. yzou pushed a commit to branch yzou-test-shade in repository https://gitbox.apache.org/repos/asf/polaris.git
commit a166e53b558116738b12f8a5bd76a7b47ebc08d2 Author: Yun Zou <yunzou.colost...@gmail.com> AuthorDate: Wed Jun 18 14:44:10 2025 -0700 update change --- codestyle/checkstyle.xml | 8 ++++++++ codestyle/{checkstyle.xml => checkstyle_no_illegalimport.xml} | 0 plugins/spark/v3.5/integration/build.gradle.kts | 5 +---- plugins/spark/v3.5/spark/build.gradle.kts | 5 +++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml index 5f102b9d7..d3986dc3e 100644 --- a/codestyle/checkstyle.xml +++ b/codestyle/checkstyle.xml @@ -39,5 +39,13 @@ <property name="optional" value="true"/> </module> + <module name="TreeWalker"> + <!-- Checks for imports --> + <!-- See http://checkstyle.org/config_imports.html --> + <module name="IllegalImport"> + <property name="illegalPkgs" value=".*\.shaded\..*, .*\.relocated\..*"/> + <property name="regexp" value="true"/> + </module> + </module> </module> diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle_no_illegalimport.xml similarity index 100% copy from codestyle/checkstyle.xml copy to codestyle/checkstyle_no_illegalimport.xml diff --git a/plugins/spark/v3.5/integration/build.gradle.kts b/plugins/spark/v3.5/integration/build.gradle.kts index 78a4f15c2..a27361b41 100644 --- a/plugins/spark/v3.5/integration/build.gradle.kts +++ b/plugins/spark/v3.5/integration/build.gradle.kts @@ -50,10 +50,7 @@ dependencies { ) testImplementation(project(":polaris-spark-${sparkMajorVersion}_${scalaVersion}")) - testImplementation(project(":polaris-api-management-model")) { - // exclude the iceberg - exclude("org.apache.iceberg", "iceberg-core") - } + testImplementation(project(":polaris-api-management-model")) testImplementation("org.apache.spark:spark-sql_${scalaVersion}:${spark35Version}") { // exclude log4j dependencies. Explicit dependencies for the log4j libraries are diff --git a/plugins/spark/v3.5/spark/build.gradle.kts b/plugins/spark/v3.5/spark/build.gradle.kts index 838ac3cc7..11cf67f73 100644 --- a/plugins/spark/v3.5/spark/build.gradle.kts +++ b/plugins/spark/v3.5/spark/build.gradle.kts @@ -37,6 +37,11 @@ val scalaLibraryVersion = pluginlibs.versions.scala213.get() } +// the spark client relies on the shaded libraries from iceberg-spark-runtime, and therefore +// uses imports like org.apache.iceberg.shaded.*. Use checkstyle_no_illegalimport.xml to allow +// the import from shaded libraries for spark client. +checkstyle { configFile = rootProject.file("codestyle/checkstyle_no_illegalimport.xml") } + dependencies { // TODO: extract a polaris-rest module as a thin layer for // client to depends on.