Skip to content

Commit 4af42ed

Browse files
rafael-tellesvfraga
authored andcommitted
Flight SQL Ratification Based On Community Feedback #7 (apache#98)
* Remove scope from 'hamcrest' dependency on java/pom.xml * Use flight top-level module on parent pom.xml instead of declaring each one * Avoid using getStatement inside StatementContext methods * Make StatementContext.getQuery() return String * Minor fixes on pom.xml * Move 'os-maven-plugin' to parent pom.xml * Update protobuf generation on pom.xml files * Use ClassLoader#getResource to get network.properties on TestFlightSql * Bind to any ephemeral port on TestFlightSql * Move JDBC-Arrow type default conversion from JdbcToArrowConfig to JdbcToArrowUtils * Micro-optimization: initialize ArrayList with the right size * Fix null-check on PreparedStatement#setParameters * Avoid wrapping vector into a ImmutableList and then into an ArrayList on FlightSqlExample#getTablesRoot * Remove null-check on VectorSchemaRoot on FlightSqlClient#setParameters() * Remove the need of separate cache for ResultSets * Add missing 'final' modifiers
1 parent 8494d09 commit 4af42ed

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

java/flight/flight-sql/src/test/java/org/apache/arrow/flight/TestFlightSql.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
import static org.hamcrest.CoreMatchers.notNullValue;
2828
import static org.hamcrest.CoreMatchers.nullValue;
2929

30-
import java.io.ByteArrayInputStream;
31-
import java.io.IOException;
32-
import java.nio.channels.Channels;
30+
import java.nio.ByteBuffer;
3331
import java.sql.SQLException;
3432
import java.util.ArrayList;
3533
import java.util.Arrays;

java/flight/pom.xml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
<packaging>pom</packaging>
2626

2727
<properties>
28-
<dep.grpc.version>1.44.1</dep.grpc.version>
29-
<dep.netty-tcnative.version>2.0.46.Final</dep.netty-tcnative.version>
30-
<dep.protobuf.version>3.19.4</dep.protobuf.version>
28+
<dep.grpc.version>1.30.2</dep.grpc.version>
29+
<dep.protobuf.version>3.7.1</dep.protobuf.version>
3130
</properties>
3231

3332
<modules>
@@ -39,22 +38,14 @@
3938
</modules>
4039

4140
<build>
42-
<pluginManagement>
43-
<plugins>
44-
<plugin>
45-
<groupId>org.xolstice.maven.plugins</groupId>
46-
<artifactId>protobuf-maven-plugin</artifactId>
47-
<version>0.6.1</version>
48-
<configuration>
49-
<protocArtifact>
50-
com.google.protobuf:protoc:${dep.protobuf.version}:exe:${os.detected.classifier}
51-
</protocArtifact>
52-
<pluginId>grpc-java</pluginId>
53-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${dep.grpc.version}:exe:${os.detected.classifier}
54-
</pluginArtifact>
55-
</configuration>
56-
</plugin>
57-
</plugins>
58-
</pluginManagement>
41+
<extensions>
42+
<!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
43+
<extension>
44+
<groupId>kr.motd.maven</groupId>
45+
<artifactId>os-maven-plugin</artifactId>
46+
<version>1.5.0.Final</version>
47+
</extension>
48+
</extensions>
5949
</build>
50+
6051
</project>

java/pom.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,38 @@
506506
</lifecycleMappingMetadata>
507507
</configuration>
508508
</plugin>
509+
510+
<plugin>
511+
<groupId>org.xolstice.maven.plugins</groupId>
512+
<artifactId>protobuf-maven-plugin</artifactId>
513+
<version>0.6.1</version>
514+
<configuration>
515+
<protocArtifact>com.google.protobuf:protoc:${dep.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
516+
<pluginId>grpc-java</pluginId>
517+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${dep.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
518+
</configuration>
519+
<executions>
520+
<execution>
521+
<id>proto-compile</id>
522+
<phase>generate-sources</phase>
523+
<configuration>
524+
<protoSourceRoot>${basedir}/../format/</protoSourceRoot>
525+
</configuration>
526+
<goals>
527+
<goal>compile</goal>
528+
<goal>compile-custom</goal>
529+
</goals>
530+
</execution>
531+
<execution>
532+
<id>proto-test-compile</id>
533+
<phase>generate-test-sources</phase>
534+
<goals>
535+
<goal>test-compile</goal>
536+
<goal>test-compile-custom</goal>
537+
</goals>
538+
</execution>
539+
</executions>
540+
</plugin>
509541
</plugins>
510542
</pluginManagement>
511543
</build>

0 commit comments

Comments
 (0)