From 2ec78aa054263d06a6c70191fc80569cc2ebf329 Mon Sep 17 00:00:00 2001 From: samikshya-chand_data Date: Fri, 6 Mar 2026 16:26:50 +0530 Subject: [PATCH 1/6] Fix the JDK8 github action + make local build developer friendly --- .github/workflows/prCheckJDK8.yml | 10 +++----- assembly-thin/.flattened-pom.xml | 42 +++++++++++++++++++++++++++++++ assembly-uber/.flattened-pom.xml | 42 +++++++++++++++++++++++++++++++ jdbc-core/pom.xml | 23 +++++++++++++++++ 4 files changed, 110 insertions(+), 7 deletions(-) create mode 100644 assembly-thin/.flattened-pom.xml create mode 100644 assembly-uber/.flattened-pom.xml diff --git a/.github/workflows/prCheckJDK8.yml b/.github/workflows/prCheckJDK8.yml index 0899867162..cdac2837e6 100644 --- a/.github/workflows/prCheckJDK8.yml +++ b/.github/workflows/prCheckJDK8.yml @@ -37,8 +37,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref || inputs.branch }} + repository: ${{ github.event.pull_request.head.repo.full_name || inputs.repository }} - name: Cache Maven packages uses: actions/cache@v4 @@ -48,8 +48,4 @@ jobs: restore-keys: ${{ runner.os }}-jdk8-m2 - name: Run Unit Tests - run: mvn -pl jdbc-core clean test -Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled' - - - name: Check Arrow Memory Tests - shell: bash - run: mvn -Plow-memory -pl jdbc-core test -Dtest='DatabricksArrowPatchMemoryUsageTest' + run: mvn -pl jdbc-core -Plocal clean test diff --git a/assembly-thin/.flattened-pom.xml b/assembly-thin/.flattened-pom.xml new file mode 100644 index 0000000000..fccabc8ade --- /dev/null +++ b/assembly-thin/.flattened-pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + com.databricks + databricks-jdbc-thin + 3.2.2-SNAPSHOT + Databricks JDBC thin jar + Databricks JDBC thin jar. + https://github.com/databricks/databricks-jdbc + + + Apache License, Version 2.0 + https://github.com/databricks/databricks-jdbc/blob/main/LICENSE + + + + + Databricks JDBC Team + eng-oss-sql-driver@databricks.com + Databricks + https://www.databricks.com + + + + scm:git:https://github.com/databricks/databricks-jdbc.git + scm:git:https://github.com/databricks/databricks-jdbc.git + https://github.com/databricks/databricks-jdbc + + + GitHub Issues + https://github.com/databricks/databricks-jdbc/issues + + + + com.databricks + databricks-jdbc-core + 3.2.2-SNAPSHOT + compile + + + diff --git a/assembly-uber/.flattened-pom.xml b/assembly-uber/.flattened-pom.xml new file mode 100644 index 0000000000..273ee3b20d --- /dev/null +++ b/assembly-uber/.flattened-pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + com.databricks + databricks-jdbc + 3.2.2-SNAPSHOT + Databricks JDBC uber jar + Databricks JDBC uber jar. + https://github.com/databricks/databricks-jdbc + + + Apache License, Version 2.0 + https://github.com/databricks/databricks-jdbc/blob/main/LICENSE + + + + + Databricks JDBC Team + eng-oss-sql-driver@databricks.com + Databricks + https://www.databricks.com + + + + scm:git:https://github.com/databricks/databricks-jdbc.git + scm:git:https://github.com/databricks/databricks-jdbc.git + https://github.com/databricks/databricks-jdbc + + + GitHub Issues + https://github.com/databricks/databricks-jdbc/issues + + + + com.databricks + databricks-jdbc-core + 3.2.2-SNAPSHOT + compile + + + diff --git a/jdbc-core/pom.xml b/jdbc-core/pom.xml index 7b6c273be6..8590b60a7d 100644 --- a/jdbc-core/pom.xml +++ b/jdbc-core/pom.xml @@ -429,6 +429,29 @@ + + local + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + + !Jvm17PlusAndArrowToNioReflectionDisabled + + **/integration/** + org/apache/arrow/memory/** + com/databricks/client/jdbc/** + + + + + + + low-memory From 60cbe9a744deb9f0b1723cabe3763b2f0be99c5e Mon Sep 17 00:00:00 2001 From: samikshya-chand_data Date: Fri, 6 Mar 2026 16:40:52 +0530 Subject: [PATCH 2/6] Remove accidentally committed flattened pom files and add to gitignore .flattened-pom.xml files generated by flatten-maven-plugin were accidentally committed. Remove them and add to .gitignore to prevent recurrence. Signed-off-by: samikshya-chand_data --- .gitignore | 1 + assembly-thin/.flattened-pom.xml | 42 -------------------------------- assembly-uber/.flattened-pom.xml | 42 -------------------------------- 3 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 assembly-thin/.flattened-pom.xml delete mode 100644 assembly-uber/.flattened-pom.xml diff --git a/.gitignore b/.gitignore index c532e5eca8..52920b4c79 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ logs/ *.pem **/test/java/com/databricks/client/jdbc/DatabricksDriverExamples.java dependency-reduced-pom.xml +.flattened-pom.xml diff --git a/assembly-thin/.flattened-pom.xml b/assembly-thin/.flattened-pom.xml deleted file mode 100644 index fccabc8ade..0000000000 --- a/assembly-thin/.flattened-pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - 4.0.0 - com.databricks - databricks-jdbc-thin - 3.2.2-SNAPSHOT - Databricks JDBC thin jar - Databricks JDBC thin jar. - https://github.com/databricks/databricks-jdbc - - - Apache License, Version 2.0 - https://github.com/databricks/databricks-jdbc/blob/main/LICENSE - - - - - Databricks JDBC Team - eng-oss-sql-driver@databricks.com - Databricks - https://www.databricks.com - - - - scm:git:https://github.com/databricks/databricks-jdbc.git - scm:git:https://github.com/databricks/databricks-jdbc.git - https://github.com/databricks/databricks-jdbc - - - GitHub Issues - https://github.com/databricks/databricks-jdbc/issues - - - - com.databricks - databricks-jdbc-core - 3.2.2-SNAPSHOT - compile - - - diff --git a/assembly-uber/.flattened-pom.xml b/assembly-uber/.flattened-pom.xml deleted file mode 100644 index 273ee3b20d..0000000000 --- a/assembly-uber/.flattened-pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - 4.0.0 - com.databricks - databricks-jdbc - 3.2.2-SNAPSHOT - Databricks JDBC uber jar - Databricks JDBC uber jar. - https://github.com/databricks/databricks-jdbc - - - Apache License, Version 2.0 - https://github.com/databricks/databricks-jdbc/blob/main/LICENSE - - - - - Databricks JDBC Team - eng-oss-sql-driver@databricks.com - Databricks - https://www.databricks.com - - - - scm:git:https://github.com/databricks/databricks-jdbc.git - scm:git:https://github.com/databricks/databricks-jdbc.git - https://github.com/databricks/databricks-jdbc - - - GitHub Issues - https://github.com/databricks/databricks-jdbc/issues - - - - com.databricks - databricks-jdbc-core - 3.2.2-SNAPSHOT - compile - - - From bb16057ee246b9abdf281d8192151e7e3cabad8d Mon Sep 17 00:00:00 2001 From: samikshya-chand_data Date: Fri, 6 Mar 2026 17:13:47 +0530 Subject: [PATCH 3/6] Update readme --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 05ff72b1a1..e898842b29 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,16 @@ This is a multi-module Maven project: | `test-assembly-thin` | `test-databricks-jdbc-thin` | Packaging tests for the thin jar | 1. Clone the repository -2. Run the following command: +2. Build the driver jar (equivalent to `mvn clean package -DskipTests` in a single-module project): ```bash - mvn clean package + mvn -pl jdbc-core,assembly-uber,assembly-thin clean package -DskipTests -Ddependency-check.skip=true ``` 3. The uber jar is generated at `assembly-uber/target/databricks-jdbc-.jar` -4. The test coverage report is generated in `jdbc-core/target/site/jacoco/index.html` +4. To run unit tests and generate a coverage report (equivalent to `mvn clean test` in a single-module project): + ```bash + mvn -pl jdbc-core clean test jacoco:report -Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled' -Ddependency-check.skip=true + ``` + The test coverage report is generated in `jdbc-core/target/site/jacoco/index.html` ## Usage From d5a46d4ea64953446a9e5d4228dac6e1b66cea01 Mon Sep 17 00:00:00 2001 From: samikshya-chand_data Date: Fri, 6 Mar 2026 17:29:59 +0530 Subject: [PATCH 4/6] use full command --- .github/workflows/prCheckJDK8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prCheckJDK8.yml b/.github/workflows/prCheckJDK8.yml index cdac2837e6..84e6af6fd6 100644 --- a/.github/workflows/prCheckJDK8.yml +++ b/.github/workflows/prCheckJDK8.yml @@ -48,4 +48,4 @@ jobs: restore-keys: ${{ runner.os }}-jdk8-m2 - name: Run Unit Tests - run: mvn -pl jdbc-core -Plocal clean test + run: mvn -pl jdbc-core clean test -Ddependency-check.skip=true -Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled' -Dexcludes='**/integration/**,org/apache/arrow/memory/**,com/databricks/client/jdbc/**' From c0053ce6593b2393cb91670300f256871bdc2c66 Mon Sep 17 00:00:00 2001 From: Samikshya Chand <148681192+samikshya-db@users.noreply.github.com> Date: Fri, 6 Mar 2026 19:45:42 +0530 Subject: [PATCH 5/6] Update unit test command in prCheckJDK8.yml Keep in mind that jdk8 branch is 3 months old --- .github/workflows/prCheckJDK8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prCheckJDK8.yml b/.github/workflows/prCheckJDK8.yml index 84e6af6fd6..085a25cb42 100644 --- a/.github/workflows/prCheckJDK8.yml +++ b/.github/workflows/prCheckJDK8.yml @@ -48,4 +48,4 @@ jobs: restore-keys: ${{ runner.os }}-jdk8-m2 - name: Run Unit Tests - run: mvn -pl jdbc-core clean test -Ddependency-check.skip=true -Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled' -Dexcludes='**/integration/**,org/apache/arrow/memory/**,com/databricks/client/jdbc/**' + run: mvn clean test From 746e081c15abdd2404fcf9dcad6ccb3ababd92af Mon Sep 17 00:00:00 2001 From: samikshya-chand_data Date: Fri, 6 Mar 2026 20:37:32 +0530 Subject: [PATCH 6/6] Exclude Arrow patch classes from JaCoCo coverage calculation All Arrow tests are tagged with Jvm17PlusAndArrowToNioReflectionDisabled and run only via dedicated CI steps, not the general coverage run. Excluding them from the JaCoCo report prevents a false coverage drop. Signed-off-by: samikshya-chand_data --- jdbc-core/pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jdbc-core/pom.xml b/jdbc-core/pom.xml index 8590b60a7d..83995e556e 100644 --- a/jdbc-core/pom.xml +++ b/jdbc-core/pom.xml @@ -415,10 +415,15 @@ **/model/** **/thrift/generated/** - + org/apache/arrow/memory/util/MemoryUtil* org/apache/arrow/memory/ArrowBuf* org/apache/arrow/vector/util/DecimalUtility* + org/apache/arrow/memory/DatabricksAllocationReservation* + org/apache/arrow/memory/DatabricksBufferAllocator* + org/apache/arrow/memory/DatabricksReferenceManager* **/DatabricksArrowBuf*