Skip to content

Commit 562521c

Browse files
sabbasaniSthuthiGhosh9400lithinwxdsteveburnettelbinpallimalilibm
committed
Arrow Flight connector template
Co-authored-by: sai bhaskar reddy <[email protected]> Co-authored-by: SthuthiGhosh9400 <[email protected]> Co-authored-by: lithinwxd <[email protected]> Co-authored-by: Steve Burnett <[email protected]> Co-authored-by: elbinpallimalilibm <[email protected]> Co-authored-by: Steve Burnett <[email protected]> Co-authored-by: Timothy Meehan <[email protected]>
1 parent 004ee32 commit 562521c

File tree

55 files changed

+6420
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+6420
-1
lines changed

Diff for: .github/workflows/arrow-flight-tests.yml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: arrow flight tests
2+
3+
on:
4+
pull_request:
5+
6+
env:
7+
CONTINUOUS_INTEGRATION: true
8+
MAVEN_OPTS: "-Xmx1024M -XX:+ExitOnOutOfMemoryError"
9+
MAVEN_INSTALL_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError"
10+
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all --no-transfer-progress -Dmaven.javadoc.skip=true"
11+
MAVEN_TEST: "-B -Dair.check.skip-all -Dmaven.javadoc.skip=true -DLogTestDurationListener.enabled=true --no-transfer-progress --fail-at-end"
12+
RETRY: .github/bin/retry
13+
14+
jobs:
15+
changes:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
pull-requests: read
19+
outputs:
20+
codechange: ${{ steps.filter.outputs.codechange }}
21+
steps:
22+
- uses: dorny/paths-filter@v2
23+
id: filter
24+
with:
25+
filters: |
26+
codechange:
27+
- '!presto-docs/**'
28+
test:
29+
runs-on: ubuntu-latest
30+
needs: changes
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
modules:
35+
- ":presto-base-arrow-flight" # Only run tests for the `presto-base-arrow-flight` module
36+
37+
timeout-minutes: 80
38+
concurrency:
39+
group: ${{ github.workflow }}-test-${{ matrix.modules }}-${{ github.event.pull_request.number }}
40+
cancel-in-progress: true
41+
42+
steps:
43+
# Checkout the code only if there are changes in the relevant files
44+
- uses: actions/checkout@v4
45+
if: needs.changes.outputs.codechange == 'true'
46+
with:
47+
show-progress: false
48+
49+
# Set up Java for the build environment
50+
- uses: actions/setup-java@v2
51+
if: needs.changes.outputs.codechange == 'true'
52+
with:
53+
distribution: 'temurin'
54+
java-version: 8
55+
56+
# Cache Maven dependencies to speed up the build
57+
- name: Cache local Maven repository
58+
if: needs.changes.outputs.codechange == 'true'
59+
id: cache-maven
60+
uses: actions/cache@v2
61+
with:
62+
path: ~/.m2/repository
63+
key: ${{ runner.os }}-maven-2-${{ hashFiles('**/pom.xml') }}
64+
restore-keys: |
65+
${{ runner.os }}-maven-2-
66+
67+
# Resolve Maven dependencies (if cache is not found)
68+
- name: Populate Maven cache
69+
if: steps.cache-maven.outputs.cache-hit != 'true' && needs.changes.outputs.codechange == 'true'
70+
run: ./mvnw de.qaware.maven:go-offline-maven-plugin:resolve-dependencies --no-transfer-progress && .github/bin/download_nodejs
71+
72+
# Install dependencies for the target module
73+
- name: Maven Install
74+
if: needs.changes.outputs.codechange == 'true'
75+
run: |
76+
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
77+
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl ${{ matrix.modules }}
78+
79+
# Run Maven tests for the target module
80+
- name: Maven Tests
81+
if: needs.changes.outputs.codechange == 'true'
82+
run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }}

Diff for: .github/workflows/test-other-modules.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ jobs:
8484
!presto-test-coverage,
8585
!presto-iceberg,
8686
!presto-singlestore,
87-
!presto-native-sidecar-plugin'
87+
!presto-native-sidecar-plugin,
88+
!presto-base-arrow-flight'

Diff for: pom.xml

+27
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<dep.protobuf-java.version>3.25.5</dep.protobuf-java.version>
8585
<dep.netty.version>4.1.115.Final</dep.netty.version>
8686
<dep.snakeyaml.version>2.0</dep.snakeyaml.version>
87+
<dep.arrow.version>17.0.0</dep.arrow.version>
8788

8889
<!--
8990
America/Bahia_Banderas has:
@@ -204,6 +205,7 @@
204205
<module>presto-hana</module>
205206
<module>presto-openapi</module>
206207
<module>presto-native-sidecar-plugin</module>
208+
<module>presto-base-arrow-flight</module>
207209
</modules>
208210

209211
<dependencyManagement>
@@ -2242,6 +2244,31 @@
22422244
<artifactId>snakeyaml</artifactId>
22432245
<version>${dep.snakeyaml.version}</version>
22442246
</dependency>
2247+
2248+
<dependency>
2249+
<groupId>org.apache.arrow</groupId>
2250+
<artifactId>arrow-memory-core</artifactId>
2251+
<version>${dep.arrow.version}</version>
2252+
</dependency>
2253+
2254+
<dependency>
2255+
<groupId>org.apache.arrow</groupId>
2256+
<artifactId>arrow-jdbc</artifactId>
2257+
<version>${dep.arrow.version}</version>
2258+
</dependency>
2259+
2260+
<dependency>
2261+
<groupId>org.apache.arrow</groupId>
2262+
<artifactId>arrow-vector</artifactId>
2263+
<version>${dep.arrow.version}</version>
2264+
</dependency>
2265+
2266+
<dependency>
2267+
<groupId>org.apache.arrow</groupId>
2268+
<artifactId>flight-core</artifactId>
2269+
<version>${dep.arrow.version}</version>
2270+
</dependency>
2271+
22452272
</dependencies>
22462273
</dependencyManagement>
22472274

Diff for: presto-base-arrow-flight/pom.xml

+259
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
<?xml version="1.0"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>com.facebook.presto</groupId>
7+
<artifactId>presto-root</artifactId>
8+
<version>0.291-SNAPSHOT</version>
9+
</parent>
10+
<artifactId>presto-base-arrow-flight</artifactId>
11+
<name>presto-base-arrow-flight</name>
12+
<description>Presto - Base Arrow Flight Connector</description>
13+
14+
<properties>
15+
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
16+
<error_prone_annotations.version>2.28.0</error_prone_annotations.version>
17+
<perfmark-api.version>0.27.0</perfmark-api.version>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.apache.arrow</groupId>
23+
<artifactId>arrow-memory-core</artifactId>
24+
<exclusions>
25+
<exclusion>
26+
<groupId>org.slf4j</groupId>
27+
<artifactId>slf4j-api</artifactId>
28+
</exclusion>
29+
</exclusions>
30+
</dependency>
31+
32+
<dependency>
33+
<groupId>org.apache.arrow</groupId>
34+
<artifactId>arrow-jdbc</artifactId>
35+
<exclusions>
36+
<exclusion>
37+
<groupId>org.slf4j</groupId>
38+
<artifactId>slf4j-api</artifactId>
39+
</exclusion>
40+
</exclusions>
41+
</dependency>
42+
43+
<dependency>
44+
<groupId>org.apache.arrow</groupId>
45+
<artifactId>arrow-vector</artifactId>
46+
<exclusions>
47+
<exclusion>
48+
<groupId>org.slf4j</groupId>
49+
<artifactId>slf4j-api</artifactId>
50+
</exclusion>
51+
<!-- Excluding to resolve upper bound errors -->
52+
<exclusion>
53+
<groupId>com.fasterxml.jackson.datatype</groupId>
54+
<artifactId>jackson-datatype-jsr310</artifactId>
55+
</exclusion>
56+
</exclusions>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>org.apache.arrow</groupId>
61+
<artifactId>flight-core</artifactId>
62+
<exclusions>
63+
<exclusion>
64+
<groupId>org.slf4j</groupId>
65+
<artifactId>slf4j-api</artifactId>
66+
</exclusion>
67+
</exclusions>
68+
</dependency>
69+
70+
<dependency>
71+
<groupId>com.facebook.airlift</groupId>
72+
<artifactId>bootstrap</artifactId>
73+
</dependency>
74+
75+
<dependency>
76+
<groupId>com.facebook.airlift</groupId>
77+
<artifactId>log</artifactId>
78+
</dependency>
79+
80+
<dependency>
81+
<groupId>com.google.guava</groupId>
82+
<artifactId>guava</artifactId>
83+
</dependency>
84+
85+
<dependency>
86+
<groupId>javax.inject</groupId>
87+
<artifactId>javax.inject</artifactId>
88+
</dependency>
89+
90+
<dependency>
91+
<groupId>com.facebook.presto</groupId>
92+
<artifactId>presto-spi</artifactId>
93+
</dependency>
94+
95+
<dependency>
96+
<groupId>io.airlift</groupId>
97+
<artifactId>slice</artifactId>
98+
</dependency>
99+
100+
<dependency>
101+
<groupId>com.fasterxml.jackson.core</groupId>
102+
<artifactId>jackson-annotations</artifactId>
103+
</dependency>
104+
105+
<dependency>
106+
<groupId>com.facebook.presto</groupId>
107+
<artifactId>presto-common</artifactId>
108+
</dependency>
109+
110+
<dependency>
111+
<groupId>com.fasterxml.jackson.core</groupId>
112+
<artifactId>jackson-databind</artifactId>
113+
</dependency>
114+
115+
<dependency>
116+
<groupId>com.fasterxml.jackson.core</groupId>
117+
<artifactId>jackson-core</artifactId>
118+
</dependency>
119+
120+
<dependency>
121+
<groupId>com.google.code.findbugs</groupId>
122+
<artifactId>jsr305</artifactId>
123+
<optional>true</optional>
124+
</dependency>
125+
126+
<dependency>
127+
<groupId>com.google.inject</groupId>
128+
<artifactId>guice</artifactId>
129+
</dependency>
130+
131+
<dependency>
132+
<groupId>com.facebook.airlift</groupId>
133+
<artifactId>configuration</artifactId>
134+
</dependency>
135+
136+
<dependency>
137+
<groupId>joda-time</groupId>
138+
<artifactId>joda-time</artifactId>
139+
</dependency>
140+
141+
<dependency>
142+
<groupId>org.jdbi</groupId>
143+
<artifactId>jdbi3-core</artifactId>
144+
</dependency>
145+
146+
<!-- for testing -->
147+
<dependency>
148+
<groupId>org.testng</groupId>
149+
<artifactId>testng</artifactId>
150+
<scope>test</scope>
151+
</dependency>
152+
153+
<dependency>
154+
<groupId>io.airlift.tpch</groupId>
155+
<artifactId>tpch</artifactId>
156+
<scope>test</scope>
157+
</dependency>
158+
159+
<dependency>
160+
<groupId>com.facebook.presto</groupId>
161+
<artifactId>presto-tpch</artifactId>
162+
<scope>test</scope>
163+
</dependency>
164+
165+
<dependency>
166+
<groupId>com.facebook.airlift</groupId>
167+
<artifactId>json</artifactId>
168+
<scope>test</scope>
169+
</dependency>
170+
171+
<dependency>
172+
<groupId>com.facebook.presto</groupId>
173+
<artifactId>presto-testng-services</artifactId>
174+
<scope>test</scope>
175+
</dependency>
176+
177+
<dependency>
178+
<groupId>com.facebook.airlift</groupId>
179+
<artifactId>testing</artifactId>
180+
<scope>test</scope>
181+
</dependency>
182+
183+
<dependency>
184+
<groupId>com.facebook.presto</groupId>
185+
<artifactId>presto-main</artifactId>
186+
<scope>test</scope>
187+
</dependency>
188+
189+
<dependency>
190+
<groupId>com.facebook.presto</groupId>
191+
<artifactId>presto-tests</artifactId>
192+
<scope>test</scope>
193+
</dependency>
194+
195+
<dependency>
196+
<groupId>com.h2database</groupId>
197+
<artifactId>h2</artifactId>
198+
<scope>test</scope>
199+
</dependency>
200+
</dependencies>
201+
202+
<dependencyManagement>
203+
<dependencies>
204+
<dependency>
205+
<groupId>com.google.errorprone</groupId>
206+
<artifactId>error_prone_annotations</artifactId>
207+
<version>${error_prone_annotations.version}</version>
208+
</dependency>
209+
210+
<dependency>
211+
<groupId>io.perfmark</groupId>
212+
<artifactId>perfmark-api</artifactId>
213+
<version>${perfmark-api.version}</version>
214+
</dependency>
215+
</dependencies>
216+
</dependencyManagement>
217+
218+
<build>
219+
<plugins>
220+
<plugin>
221+
<groupId>org.apache.maven.plugins</groupId>
222+
<artifactId>maven-surefire-plugin</artifactId>
223+
<configuration>
224+
<argLine>-Xss10M</argLine>
225+
</configuration>
226+
</plugin>
227+
<plugin>
228+
<groupId>org.apache.maven.plugins</groupId>
229+
<artifactId>maven-enforcer-plugin</artifactId>
230+
</plugin>
231+
<plugin>
232+
<groupId>org.apache.maven.plugins</groupId>
233+
<artifactId>maven-dependency-plugin</artifactId>
234+
</plugin>
235+
<plugin>
236+
<groupId>org.basepom.maven</groupId>
237+
<artifactId>duplicate-finder-maven-plugin</artifactId>
238+
<version>1.2.1</version>
239+
<configuration>
240+
<ignoredClassPatterns>
241+
<ignoredClassPattern>module-info</ignoredClassPattern>
242+
<ignoredClassPattern>META-INF.versions.9.module-info</ignoredClassPattern>
243+
</ignoredClassPatterns>
244+
<ignoredResourcePatterns>
245+
<ignoredResourcePattern>arrow-git.properties</ignoredResourcePattern>
246+
<ignoredResourcePattern>about.html</ignoredResourcePattern>
247+
</ignoredResourcePatterns>
248+
</configuration>
249+
<executions>
250+
<execution>
251+
<goals>
252+
<goal>check</goal>
253+
</goals>
254+
</execution>
255+
</executions>
256+
</plugin>
257+
</plugins>
258+
</build>
259+
</project>

0 commit comments

Comments
 (0)