Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/prCheckJDK8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -48,8 +48,4 @@ jobs:
restore-keys: ${{ runner.os }}-jdk8-m2

- name: Run Unit Tests
run: mvn -pl jdbc-core clean test -Dgroups='!Jvm17PlusAndArrowToNioReflectionDisabled'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be using the local profile defined ind jdbc-core/pom.xml?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, the jdk-8 branch is 2 months old and it will not recognise the new command.
In case we happen to update the branch, the repo actions workflows will fail. In which case, we will have to update the workflow if we update the branch.


- name: Check Arrow Memory Tests
shell: bash
run: mvn -Plow-memory -pl jdbc-core test -Dtest='DatabricksArrowPatchMemoryUsageTest'
run: mvn clean test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ logs/
*.pem
**/test/java/com/databricks/client/jdbc/DatabricksDriverExamples.java
dependency-reduced-pom.xml
.flattened-pom.xml
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<version>.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

Expand Down
30 changes: 29 additions & 1 deletion jdbc-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,15 @@
<exclude>**/model/**</exclude>
<exclude>**/thrift/generated/**</exclude>

<!-- Exclude patched Arrow classes from coverage -->
<!-- Exclude patched Arrow classes from coverage. All Arrow tests are tagged with
Jvm17PlusAndArrowToNioReflectionDisabled and run only via dedicated CI steps
(-Pjdk17-NioNotOpen, -Plow-memory), not the general coverage run. -->
<exclude>org/apache/arrow/memory/util/MemoryUtil*</exclude>
<exclude>org/apache/arrow/memory/ArrowBuf*</exclude>
<exclude>org/apache/arrow/vector/util/DecimalUtility*</exclude>
<exclude>org/apache/arrow/memory/DatabricksAllocationReservation*</exclude>
<exclude>org/apache/arrow/memory/DatabricksBufferAllocator*</exclude>
<exclude>org/apache/arrow/memory/DatabricksReferenceManager*</exclude>

<!-- Exclude DatabricksArrowBuf. We test only read paths -->
<exclude>**/DatabricksArrowBuf*</exclude>
Expand All @@ -429,6 +434,29 @@
</build>

<profiles>
<profile>
<id>local</id>
<properties>
<dependency-check.skip>true</dependency-check.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>!Jvm17PlusAndArrowToNioReflectionDisabled</groups>
<excludes>
<exclude>**/integration/**</exclude>
<exclude>org/apache/arrow/memory/**</exclude>
<exclude>com/databricks/client/jdbc/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>low-memory</id>
<build>
Expand Down
Loading