Skip to content

Commit 520d980

Browse files
committed
Updated branch from upstream
2 parents 08186a8 + 32ea946 commit 520d980

File tree

12 files changed

+208
-59
lines changed

12 files changed

+208
-59
lines changed

.github/workflows/dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
python-version: '3.x'
4444
- name: pre-commit (cache)
45-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
45+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
4646
with:
4747
path: ~/.cache/pre-commit
4848
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/rc.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
run: |
7272
dev/release/run_rat.sh "${TAR_GZ}"
7373
- name: Upload source archive
74-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
74+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
7575
with:
7676
name: release-source
7777
path: |
@@ -101,7 +101,7 @@ jobs:
101101
packages: write
102102
steps:
103103
- name: Download source archive
104-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
104+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
105105
with:
106106
name: release-source
107107
- name: Extract source archive
@@ -139,7 +139,7 @@ jobs:
139139
username: ${{ github.actor }}
140140
password: ${{ secrets.GITHUB_TOKEN }}
141141
- name: Cache
142-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
142+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
143143
with:
144144
path: .docker
145145
key: jni-linux-${{ matrix.platform.arch }}-${{ hashFiles('arrow/cpp/**') }}
@@ -154,7 +154,7 @@ jobs:
154154
- name: Compress into single artifact to keep directory structure
155155
run: tar -cvzf jni-linux-${{ matrix.platform.arch }}.tar.gz jni/
156156
- name: Upload artifacts
157-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
157+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
158158
with:
159159
name: jni-linux-${{ matrix.platform.arch }}
160160
path: jni-linux-${{ matrix.platform.arch }}.tar.gz
@@ -174,7 +174,7 @@ jobs:
174174
MACOSX_DEPLOYMENT_TARGET: "14.0"
175175
steps:
176176
- name: Download source archive
177-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
177+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
178178
with:
179179
name: release-source
180180
- name: Extract source archive
@@ -270,7 +270,7 @@ jobs:
270270
run: |
271271
echo "CCACHE_DIR=${PWD}/ccache" >> ${GITHUB_ENV}
272272
- name: Cache ccache
273-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
273+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
274274
with:
275275
path: ccache
276276
key: jni-macos-${{ matrix.platform.arch }}-${{ hashFiles('arrow/cpp/**') }}
@@ -284,7 +284,7 @@ jobs:
284284
- name: Compress into single artifact to keep directory structure
285285
run: tar -cvzf jni-macos-${{ matrix.platform.arch }}.tar.gz jni/
286286
- name: Upload artifacts
287-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
287+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
288288
with:
289289
name: jni-macos-${{ matrix.platform.arch }}
290290
path: jni-macos-${{ matrix.platform.arch }}.tar.gz
@@ -302,7 +302,7 @@ jobs:
302302
arch: "x86_64"
303303
steps:
304304
- name: Download source archive
305-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
305+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
306306
with:
307307
name: release-source
308308
- name: Extract source archive
@@ -352,7 +352,7 @@ jobs:
352352
run: |
353353
echo "CCACHE_DIR=${PWD}/ccache" >> ${GITHUB_ENV}
354354
- name: Cache ccache
355-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
355+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
356356
with:
357357
path: ccache
358358
key: jni-windows-${{ matrix.platform.arch }}-${{ hashFiles('arrow/cpp/**') }}
@@ -368,7 +368,7 @@ jobs:
368368
shell: bash
369369
run: tar -cvzf jni-windows-${{ matrix.platform.arch }}.tar.gz jni/
370370
- name: Upload artifacts
371-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
371+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
372372
with:
373373
name: jni-windows-${{ matrix.platform.arch }}
374374
path: jni-windows-${{ matrix.platform.arch }}.tar.gz
@@ -381,7 +381,7 @@ jobs:
381381
- jni-windows
382382
steps:
383383
- name: Download artifacts
384-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
384+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
385385
with:
386386
path: artifacts
387387
- name: Decompress artifacts
@@ -426,7 +426,7 @@ jobs:
426426
repository: apache/arrow-testing
427427
path: testing
428428
- name: Cache ~/.m2
429-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
429+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
430430
with:
431431
path: ~/.m2
432432
key: binaries-build-${{ hashFiles('**/*.java', '**/pom.xml') }}
@@ -440,12 +440,12 @@ jobs:
440440
cp -a target/site/apidocs reference
441441
tar -cvzf reference.tar.gz reference
442442
- name: Upload binaries
443-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
443+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
444444
with:
445445
name: release-binaries
446446
path: binaries/*
447447
- name: Upload docs
448-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
448+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
449449
with:
450450
name: reference
451451
path: reference.tar.gz
@@ -462,11 +462,11 @@ jobs:
462462
with:
463463
cache: 'pip'
464464
- name: Download source archive
465-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
465+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
466466
with:
467467
name: release-source
468468
- name: Download Javadocs
469-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
469+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
470470
with:
471471
name: reference
472472
- name: Extract source archive
@@ -483,7 +483,7 @@ jobs:
483483
- name: Compress into single artifact to keep directory structure
484484
run: tar -cvzf html.tar.gz -C docs/build html
485485
- name: Upload artifacts
486-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
486+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
487487
with:
488488
name: release-html
489489
path: html.tar.gz
@@ -531,7 +531,7 @@ jobs:
531531
cp ../.asf.yaml ./
532532
git add .nojekyll .asf.yaml
533533
- name: Download
534-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
534+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
535535
with:
536536
name: release-html
537537
- name: Extract
@@ -567,7 +567,7 @@ jobs:
567567
- ubuntu-latest
568568
steps:
569569
- name: Download release artifacts
570-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
570+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
571571
with:
572572
pattern: release-*
573573
- name: Verify
@@ -601,7 +601,7 @@ jobs:
601601
contents: write
602602
steps:
603603
- name: Download release artifacts
604-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
604+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
605605
with:
606606
pattern: release-*
607607
path: artifacts

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
fetch-depth: 0
6464
submodules: recursive
6565
- name: Cache Docker Volumes
66-
uses: actions/cache@v4
66+
uses: actions/cache@v5
6767
with:
6868
path: .docker
6969
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('compose.yaml', '**/pom.xml', '**/*.java') }}
@@ -89,7 +89,7 @@ jobs:
8989
include:
9090
- arch: AMD64
9191
jdk: 11
92-
macos: 13
92+
macos: 15-intel
9393
- arch: AArch64
9494
jdk: 11
9595
macos: latest
@@ -190,7 +190,7 @@ jobs:
190190
run: |
191191
ci/scripts/util_free_space.sh
192192
- name: Cache Docker Volumes
193-
uses: actions/cache@v4
193+
uses: actions/cache@v5
194194
with:
195195
path: .docker
196196
key: integration-conda-${{ hashFiles('cpp/**') }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
.buildpath
88
.checkstyle
99
.classpath
10+
.cursor/
1011
.factorypath
1112
.idea/
1213
.project
1314
.settings/
15+
.vscode/
1416
/*-build/
1517
/.mvn/.develocity/
1618
/apache-arrow-java-*

ci/scripts/jni_macos_build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ cmake \
7777
cmake --build "${build_dir}/cpp" --target install
7878
github_actions_group_end
7979

80-
export JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/protobuf_ep-install"
80+
JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/_deps/protobuf-build"
81+
JAVA_JNI_CMAKE_ARGS+=" -DProtobuf_SRC_ROOT_FOLDER=${build_dir}/cpp/_deps/protobuf-src"
82+
export JAVA_JNI_CMAKE_ARGS
8183
"${source_dir}/ci/scripts/jni_build.sh" \
8284
"${source_dir}" \
8385
"${install_dir}" \

flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/ArrowFlightMetaImpl.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ static Signature newSignature(final String sql, Schema resultSetSchema, Schema p
7979
public void closeStatement(final StatementHandle statementHandle) {
8080
PreparedStatement preparedStatement =
8181
statementHandlePreparedStatementMap.remove(new StatementHandleKey(statementHandle));
82-
// Testing if the prepared statement was created because the statement can be not created until
82+
// Testing if the prepared statement was created because the statement can be
83+
// not created until
8384
// this moment
8485
if (preparedStatement != null) {
8586
preparedStatement.close();
@@ -224,7 +225,8 @@ public ExecuteResult prepareAndExecute(
224225
MetaResultSet.create(handle.connectionId, handle.id, false, handle.signature, null);
225226
return new ExecuteResult(Collections.singletonList(metaResultSet));
226227
} catch (SQLTimeoutException e) {
227-
// So far AvaticaStatement(executeInternal) only handles NoSuchStatement and Runtime
228+
// So far AvaticaStatement(executeInternal) only handles NoSuchStatement and
229+
// Runtime
228230
// Exceptions.
229231
throw new RuntimeException(e);
230232
} catch (SQLException e) {
@@ -253,6 +255,20 @@ public boolean syncResults(
253255
return false;
254256
}
255257

258+
@Override
259+
public ConnectionProperties connectionSync(ConnectionHandle ch, ConnectionProperties connProps) {
260+
final ConnectionProperties result = super.connectionSync(ch, connProps);
261+
final String newCatalog = this.connProps.getCatalog();
262+
if (newCatalog != null) {
263+
try {
264+
((ArrowFlightConnection) connection).getClientHandler().setCatalog(newCatalog);
265+
} catch (SQLException e) {
266+
throw new RuntimeException(e);
267+
}
268+
}
269+
return result;
270+
}
271+
256272
void setDefaultConnectionProperties() {
257273
// TODO Double-check this.
258274
connProps
@@ -268,7 +284,8 @@ PreparedStatement getPreparedStatement(StatementHandle statementHandle) {
268284
return statementHandlePreparedStatementMap.get(new StatementHandleKey(statementHandle));
269285
}
270286

271-
// Helper used to look up prepared statement instances later. Avatica doesn't give us the
287+
// Helper used to look up prepared statement instances later. Avatica doesn't
288+
// give us the
272289
// signature in
273290
// an UPDATE code path so we can't directly use StatementHandle as a map key.
274291
private static final class StatementHandleKey {

0 commit comments

Comments
 (0)