Skip to content

Commit

Permalink
[CALCITE-6387] Make Arrow adapter passing tests with jdk17+
Browse files Browse the repository at this point in the history
  • Loading branch information
snuyanzin committed Apr 28, 2024
1 parent aa8d81b commit 3e633f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ jobs:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
# The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
# to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
_JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }} --add-opens=java.base/java.nio=ALL-UNNAMED
with:
job-id: jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
Expand All @@ -248,9 +245,6 @@ jobs:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
# The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
# to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
_JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }} --add-opens=java.base/java.nio=ALL-UNNAMED
with:
job-id: jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
Expand Down Expand Up @@ -320,9 +314,6 @@ jobs:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
# The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
# to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
_JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }} --add-opens=java.base/java.nio=ALL-UNNAMED
with:
job-id: jdk19
remote-build-cache-proxy-enabled: false
Expand Down
4 changes: 1 addition & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ node('ubuntu') {
}
stage('Code Quality') {
timeout(time: 1, unit: 'HOURS') {
// The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
// to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17","_JAVA_OPTIONS=--add-opens=java.base/java.nio=ALL-UNNAMED"]) {
withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17"]) {
withCredentials([string(credentialsId: 'SONARCLOUD_TOKEN', variable: 'SONAR_TOKEN')]) {
if ( env.BRANCH_NAME.startsWith("PR-") ) {
sh './gradlew --no-parallel --no-daemon jacocoAggregateTestReport sonar -PenableJacoco -Dsonar.pullrequest.branch=${CHANGE_BRANCH} -Dsonar.pullrequest.base=${CHANGE_TARGET} -Dsonar.pullrequest.key=${CHANGE_ID} -Dsonar.login=${SONAR_TOKEN}'
Expand Down
11 changes: 11 additions & 0 deletions arrow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.github.vlsi.gradle.dsl.configureEach

dependencies {
api(project(":core"))

Expand All @@ -30,3 +32,12 @@ dependencies {
testImplementation(project(":core"))
testImplementation(project(":testkit"))
}

plugins.withType<JavaPlugin> {
tasks {
configureEach<Test> {
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED")
}
}
}

0 comments on commit 3e633f6

Please sign in to comment.