Skip to content

Commit

Permalink
Arrow Flight connector template
Browse files Browse the repository at this point in the history
Co-authored-by: sai bhaskar reddy <sai.bhaskar.reddy.sabbasani1@ibm.com>
Co-authored-by: SthuthiGhosh9400 <Sthuthi.Ghosh@ibm.com>
Co-authored-by: lithinwxd <Lithin.Purushothaman@ibm.com>
Co-authored-by: Steve Burnett <burnett@pobox.com>
Co-authored-by: elbinpallimalilibm <elbin.pallimalil@ibm.com>
Co-authored-by: Steve Burnett <burnett@pobox.com>
Co-authored-by: Timothy Meehan <tim@timdmeehan.com>
  • Loading branch information
6 people committed Dec 14, 2024
1 parent 004ee32 commit 2d34620
Show file tree
Hide file tree
Showing 55 changed files with 6,432 additions and 1 deletion.
82 changes: 82 additions & 0 deletions .github/workflows/arrow-flight-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: arrow flight tests

on:
pull_request:

env:
CONTINUOUS_INTEGRATION: true
MAVEN_OPTS: "-Xmx1024M -XX:+ExitOnOutOfMemoryError"
MAVEN_INSTALL_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all --no-transfer-progress -Dmaven.javadoc.skip=true"
MAVEN_TEST: "-B -Dair.check.skip-all -Dmaven.javadoc.skip=true -DLogTestDurationListener.enabled=true --no-transfer-progress --fail-at-end"
RETRY: .github/bin/retry

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
codechange: ${{ steps.filter.outputs.codechange }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
codechange:
- '!presto-docs/**'
test:
runs-on: ubuntu-latest
needs: changes
strategy:
fail-fast: false
matrix:
modules:
- ":presto-base-arrow-flight" # Only run tests for the `presto-base-arrow-flight` module

timeout-minutes: 80
concurrency:
group: ${{ github.workflow }}-test-${{ matrix.modules }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

steps:
# Checkout the code only if there are changes in the relevant files
- uses: actions/checkout@v4
if: needs.changes.outputs.codechange == 'true'
with:
show-progress: false

# Set up Java for the build environment
- uses: actions/setup-java@v2
if: needs.changes.outputs.codechange == 'true'
with:
distribution: 'temurin'
java-version: 8

# Cache Maven dependencies to speed up the build
- name: Cache local Maven repository
if: needs.changes.outputs.codechange == 'true'
id: cache-maven
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-2-
# Resolve Maven dependencies (if cache is not found)
- name: Populate Maven cache
if: steps.cache-maven.outputs.cache-hit != 'true' && needs.changes.outputs.codechange == 'true'
run: ./mvnw de.qaware.maven:go-offline-maven-plugin:resolve-dependencies --no-transfer-progress && .github/bin/download_nodejs

# Install dependencies for the target module
- name: Maven Install
if: needs.changes.outputs.codechange == 'true'
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl ${{ matrix.modules }}
# Run Maven tests for the target module
- name: Maven Tests
if: needs.changes.outputs.codechange == 'true'
run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }}
3 changes: 2 additions & 1 deletion .github/workflows/test-other-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ jobs:
!presto-test-coverage,
!presto-iceberg,
!presto-singlestore,
!presto-native-sidecar-plugin'
!presto-native-sidecar-plugin,
!presto-base-arrow-flight'
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<dep.protobuf-java.version>3.25.5</dep.protobuf-java.version>
<dep.netty.version>4.1.115.Final</dep.netty.version>
<dep.snakeyaml.version>2.0</dep.snakeyaml.version>
<dep.arrow.version>17.0.0</dep.arrow.version>

<!--
America/Bahia_Banderas has:
Expand Down Expand Up @@ -204,6 +205,7 @@
<module>presto-hana</module>
<module>presto-openapi</module>
<module>presto-native-sidecar-plugin</module>
<module>presto-base-arrow-flight</module>
</modules>

<dependencyManagement>
Expand Down Expand Up @@ -2242,6 +2244,31 @@
<artifactId>snakeyaml</artifactId>
<version>${dep.snakeyaml.version}</version>
</dependency>

<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-core</artifactId>
<version>${dep.arrow.version}</version>
</dependency>

<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-jdbc</artifactId>
<version>${dep.arrow.version}</version>
</dependency>

<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
<version>${dep.arrow.version}</version>
</dependency>

<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>flight-core</artifactId>
<version>${dep.arrow.version}</version>
</dependency>

</dependencies>
</dependencyManagement>

Expand Down
Loading

0 comments on commit 2d34620

Please sign in to comment.