Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkubik committed Oct 29, 2024
1 parent 93e98ea commit 3ae60f5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.stream.Stream;
import net.snowflake.client.core.arrow.ArrayConverter;
import net.snowflake.client.core.arrow.ArrowVectorConverter;
import net.snowflake.client.core.arrow.StructConverter;
import net.snowflake.client.core.arrow.VarCharConverter;
import net.snowflake.client.core.arrow.VectorTypeConverter;
import net.snowflake.client.core.json.Converters;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package net.snowflake.client.core.arrow;

import java.util.List;
import java.util.stream.Collectors;
import net.snowflake.client.core.DataConversionContext;
import net.snowflake.client.core.SFException;
import net.snowflake.client.core.arrow.tostringhelpers.ArrowObjectStringRepresentationBuilder;
import net.snowflake.client.jdbc.SnowflakeSQLException;
import net.snowflake.client.jdbc.SnowflakeType;
import org.apache.arrow.vector.FieldVector;
import org.apache.arrow.vector.complex.MapVector;
import org.apache.arrow.vector.util.JsonStringHashMap;

public class MapConverter extends AbstractArrowVectorConverter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,18 @@ public void testRunAsGetString() throws SQLException {
@ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)
public void testRunAsGetObject() throws SQLException {
withFirstRow(
connections.get(queryResultFormat),
selectSql,
(resultSet) -> assertGetObjectIsCompatible(resultSet, expectedStructureTypeRepresentation));
connections.get(queryResultFormat),
selectSql,
(resultSet) -> assertGetObjectIsCompatible(resultSet, expectedStructureTypeRepresentation));
}

@Test
@ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)
public void testRunAsGetBytes() throws SQLException {
withFirstRow(
connections.get(queryResultFormat),
selectSql,
(resultSet) -> assertGetBytesIsCompatible(resultSet, expectedStructureTypeRepresentation));
connections.get(queryResultFormat),
selectSql,
(resultSet) -> assertGetBytesIsCompatible(resultSet, expectedStructureTypeRepresentation));
}

@Parameterized.Parameters(name = "format={0},sql={1}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ protected static Connection initConnection(ResultSetFormatType queryResultFormat
}

protected void assertGetBytesIsCompatible(ResultSet resultSet, String expected)
throws SQLException {
throws SQLException {
String result = new String(resultSet.getBytes(1), StandardCharsets.UTF_8);
TestUtil.assertEqualsIgnoringWhitespace(expected, result);
}

protected void assertGetStringIsCompatible(ResultSet resultSet, String expected)
throws SQLException {
throws SQLException {
String result = resultSet.getString(1);
TestUtil.assertEqualsIgnoringWhitespace(expected, result);
}
Expand Down

0 comments on commit 3ae60f5

Please sign in to comment.