Skip to content

Commit 3e633f6

Browse files
committed
[CALCITE-6387] Make Arrow adapter passing tests with jdk17+
1 parent aa8d81b commit 3e633f6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/main.yml

-9
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,6 @@ jobs:
219219
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
220220
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
221221
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
222-
# The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
223-
# to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
224-
_JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }} --add-opens=java.base/java.nio=ALL-UNNAMED
225222
with:
226223
job-id: jdk${{ matrix.jdk }}
227224
remote-build-cache-proxy-enabled: false
@@ -248,9 +245,6 @@ jobs:
248245
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
249246
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
250247
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
251-
# The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
252-
# to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
253-
_JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }} --add-opens=java.base/java.nio=ALL-UNNAMED
254248
with:
255249
job-id: jdk${{ matrix.jdk }}
256250
remote-build-cache-proxy-enabled: false
@@ -320,9 +314,6 @@ jobs:
320314
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
321315
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
322316
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
323-
# The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
324-
# to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
325-
_JAVA_OPTIONS: ${{ env._JAVA_OPTIONS }} --add-opens=java.base/java.nio=ALL-UNNAMED
326317
with:
327318
job-id: jdk19
328319
remote-build-cache-proxy-enabled: false

Jenkinsfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ node('ubuntu') {
4141
}
4242
stage('Code Quality') {
4343
timeout(time: 1, unit: 'HOURS') {
44-
// The following option `--add-opens=java.base/java.nio=ALL-UNNAMED` is required jdk17+
45-
// to avoid error. See https://arrow.apache.org/docs/java/install.html#java-compatibility
46-
withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17","_JAVA_OPTIONS=--add-opens=java.base/java.nio=ALL-UNNAMED"]) {
44+
withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17"]) {
4745
withCredentials([string(credentialsId: 'SONARCLOUD_TOKEN', variable: 'SONAR_TOKEN')]) {
4846
if ( env.BRANCH_NAME.startsWith("PR-") ) {
4947
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}'

arrow/build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
import com.github.vlsi.gradle.dsl.configureEach
18+
1719
dependencies {
1820
api(project(":core"))
1921

@@ -30,3 +32,12 @@ dependencies {
3032
testImplementation(project(":core"))
3133
testImplementation(project(":testkit"))
3234
}
35+
36+
plugins.withType<JavaPlugin> {
37+
tasks {
38+
configureEach<Test> {
39+
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
40+
jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED")
41+
}
42+
}
43+
}

0 commit comments

Comments
 (0)