Skip to content

Commit

Permalink
Fix Minor POM Issues to allow Maven build (apache#161)
Browse files Browse the repository at this point in the history
* Fix minor POM Issues to allow Maven Build

* Revert Flight SQL POM State

* Remove unused imports

Co-authored-by: Rafael Telles <[email protected]>
  • Loading branch information
vfraga and rafael-telles committed Dec 6, 2021
1 parent 79e15b5 commit a059c15
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
6 changes: 0 additions & 6 deletions java/flight/flight-jdbc-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@
<artifactId>flight-sql</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-format</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions java/flight/flight-sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@
<artifactId>arrow-format</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-format</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-jdbc</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -514,7 +514,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);
}
Expand Down

0 comments on commit a059c15

Please sign in to comment.