diff --git a/java/flight/flight-jdbc-driver/pom.xml b/java/flight/flight-jdbc-driver/pom.xml index b3b2191754fbf..994cc548b3ec8 100644 --- a/java/flight/flight-jdbc-driver/pom.xml +++ b/java/flight/flight-jdbc-driver/pom.xml @@ -147,12 +147,6 @@ flight-sql ${project.version} - - - org.apache.arrow - arrow-format - ${project.version} - diff --git a/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/text/ArrowFlightJdbcVarCharVectorAccessorTest.java b/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/text/ArrowFlightJdbcVarCharVectorAccessorTest.java index e8d9336061b70..c51db784ec406 100644 --- a/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/text/ArrowFlightJdbcVarCharVectorAccessorTest.java +++ b/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/accessor/impl/text/ArrowFlightJdbcVarCharVectorAccessorTest.java @@ -17,7 +17,6 @@ package org.apache.arrow.driver.jdbc.accessor.impl.text; -import static org.apache.calcite.avatica.util.Cursor.Accessor; import static org.apache.commons.io.IOUtils.toByteArray; import static org.apache.commons.io.IOUtils.toCharArray; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/adhoc/MockFlightSqlProducer.java b/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/adhoc/MockFlightSqlProducer.java index aca3c53afb735..5b8b18c98004a 100644 --- a/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/adhoc/MockFlightSqlProducer.java +++ b/java/flight/flight-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/test/adhoc/MockFlightSqlProducer.java @@ -22,7 +22,6 @@ import static java.lang.String.format; import static java.util.UUID.randomUUID; import static java.util.stream.Collectors.toList; -import static java.util.stream.IntStream.range; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -80,7 +79,6 @@ import org.apache.arrow.util.Preconditions; import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.ipc.WriteChannel; -import org.apache.arrow.vector.ipc.message.IpcOption; import org.apache.arrow.vector.ipc.message.MessageSerializer; import org.apache.arrow.vector.types.pojo.Schema; import org.apache.calcite.avatica.Meta.StatementType; diff --git a/java/flight/flight-sql/pom.xml b/java/flight/flight-sql/pom.xml index 145950db56a2b..c69b4627acd6d 100644 --- a/java/flight/flight-sql/pom.xml +++ b/java/flight/flight-sql/pom.xml @@ -57,6 +57,16 @@ arrow-jdbc ${project.version} + + org.apache.arrow + arrow-format + ${project.version} + + + org.apache.arrow + arrow-jdbc + ${project.version} + org.apache.arrow arrow-jdbc diff --git a/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java b/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java index 11b29653c287f..a65a2b3d25760 100644 --- a/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java +++ b/java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java @@ -34,7 +34,7 @@ import static org.apache.arrow.flight.sql.impl.FlightSql.DoPutUpdateResult; import static org.apache.arrow.flight.sql.impl.FlightSql.SqlInfo; -import java.io.ByteArrayInputStream; +import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream; import java.io.IOException; import java.nio.channels.Channels; import java.sql.SQLException; @@ -559,7 +559,7 @@ private Schema deserializeSchema(final ByteString bytes) { new Schema(Collections.emptyList()) : MessageSerializer.deserializeSchema( new ReadChannel(Channels.newChannel( - new ByteArrayInputStream(bytes.toByteArray())))); + new ByteBufferBackedInputStream(bytes.asReadOnlyByteBuffer())))); } catch (final IOException e) { throw new RuntimeException("Failed to deserialize schema", e); }