Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-astachowski committed Nov 6, 2024
1 parent e9001e0 commit ac43895
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/test/java/net/snowflake/client/core/SFArrowResultSetIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public void testNoOfflineData() throws Throwable {
int dataSize = (int) file.length();
byte[] dataBytes = new byte[dataSize];

try (InputStream is = new FileInputStream(file)) {
is.read(dataBytes, 0, dataSize);
}
try (InputStream is = new FileInputStream(file)) {
is.read(dataBytes, 0, dataSize);
}

SnowflakeResultSetSerializableV1 resultSetSerializable = new SnowflakeResultSetSerializableV1();
SnowflakeResultSetSerializableV1 resultSetSerializable = new SnowflakeResultSetSerializableV1();
resultSetSerializable.setRootAllocator(new RootAllocator(Long.MAX_VALUE));
resultSetSerializable.setFirstChunkStringData(Base64.getEncoder().encodeToString(dataBytes));
resultSetSerializable.setFirstChunkByteData(dataBytes);
Expand Down Expand Up @@ -225,11 +225,11 @@ public void testFirstResponseAndOfflineData() throws Throwable {
int dataSize = (int) arrowFile.length();
byte[] dataBytes = new byte[dataSize];

try (InputStream is = new FileInputStream(arrowFile)) {
is.read(dataBytes, 0, dataSize);
}
try (InputStream is = new FileInputStream(arrowFile)) {
is.read(dataBytes, 0, dataSize);
}

SnowflakeResultSetSerializableV1 resultSetSerializable = new SnowflakeResultSetSerializableV1();
SnowflakeResultSetSerializableV1 resultSetSerializable = new SnowflakeResultSetSerializableV1();
resultSetSerializable.setFirstChunkStringData(Base64.getEncoder().encodeToString(dataBytes));
resultSetSerializable.setFirstChunkByteData(dataBytes);
resultSetSerializable.setChunkFileCount(chunkCount);
Expand Down Expand Up @@ -277,7 +277,7 @@ private class MockChunkDownloader implements ChunkDownloader {
public SnowflakeResultChunk getNextChunkToConsume() throws SnowflakeSQLException {
if (currentFileIndex < resultFileNames.size()) {
ArrowResultChunk resultChunk = new ArrowResultChunk("", 0, 0, 0, rootAllocator, null);
try (InputStream is = new FileInputStream(resultFileNames.get(currentFileIndex))){
try (InputStream is = new FileInputStream(resultFileNames.get(currentFileIndex))) {
resultChunk.readArrowStream(is);

currentFileIndex++;
Expand Down Expand Up @@ -635,11 +635,11 @@ public void testSortedResultChunkWithStructVectors() throws Throwable {
int dataSize = (int) file.length();
byte[] dataBytes = new byte[dataSize];

try (InputStream is = new FileInputStream(file)) {
is.read(dataBytes, 0, dataSize);
}
try (InputStream is = new FileInputStream(file)) {
is.read(dataBytes, 0, dataSize);
}

resultSetSerializable.setRootAllocator(new RootAllocator(Long.MAX_VALUE));
resultSetSerializable.setRootAllocator(new RootAllocator(Long.MAX_VALUE));
resultSetSerializable.setFirstChunkStringData(
Base64.getEncoder().encodeToString(dataBytes));
resultSetSerializable.setFirstChunkByteData(dataBytes);
Expand Down Expand Up @@ -723,11 +723,11 @@ public void testSortedResultChunk() throws Throwable {
int dataSize = (int) file.length();
byte[] dataBytes = new byte[dataSize];

try (InputStream is = new FileInputStream(file)) {
is.read(dataBytes, 0, dataSize);
}
try (InputStream is = new FileInputStream(file)) {
is.read(dataBytes, 0, dataSize);
}

resultSetSerializable.setRootAllocator(new RootAllocator(Long.MAX_VALUE));
resultSetSerializable.setRootAllocator(new RootAllocator(Long.MAX_VALUE));
resultSetSerializable.setFirstChunkStringData(
Base64.getEncoder().encodeToString(dataBytes));
resultSetSerializable.setFirstChunkByteData(dataBytes);
Expand Down

0 comments on commit ac43895

Please sign in to comment.