Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pbulawa committed Dec 13, 2023
1 parent 29d6338 commit d62389c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Snowflake.Data/Core/ArrowResultSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ internal override async Task<bool> NextAsync()
{
s_logger.Debug($"Get next chunk from chunk downloader, chunk: {_currentChunk.ChunkIndex + 1}/{_totalChunkCount}" +
$" rows: {_currentChunk.RowCount}, size compressed: {_currentChunk.CompressedSize}," +
$" size decompressed: {_currentChunk.UncompressedSize}, " + ((ArrowResultChunk)_currentChunk).GetMetadata());
$" size uncompressed: {_currentChunk.UncompressedSize}, " + ((ArrowResultChunk)_currentChunk).GetMetadata());

Check warning on line 87 in Snowflake.Data/Core/ArrowResultSet.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ArrowResultSet.cs#L85-L87

Added lines #L85 - L87 were not covered by tests
_currentChunk = await _chunkDownloader.GetNextChunkAsync().ConfigureAwait(false);
return _currentChunk?.Next() ?? false;
}
Expand All @@ -103,7 +103,7 @@ internal override bool Next()
{
s_logger.Debug($"Get next chunk from chunk downloader, chunk: {_currentChunk.ChunkIndex + 1}/{_totalChunkCount}" +
$" rows: {_currentChunk.RowCount}, size compressed: {_currentChunk.CompressedSize}," +
$" size decompressed: {_currentChunk.UncompressedSize}, " + ((ArrowResultChunk)_currentChunk).GetMetadata());
$" size uncompressed: {_currentChunk.UncompressedSize}, " + ((ArrowResultChunk)_currentChunk).GetMetadata());

Check warning on line 106 in Snowflake.Data/Core/ArrowResultSet.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ArrowResultSet.cs#L104-L106

Added lines #L104 - L106 were not covered by tests
_currentChunk = Task.Run(async() => await (_chunkDownloader.GetNextChunkAsync()).ConfigureAwait(false)).Result;

return _currentChunk?.Next() ?? false;
Expand Down
7 changes: 3 additions & 4 deletions Snowflake.Data/Core/SFResultSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ internal override async Task<bool> NextAsync()
// So put this piece of code in a seperate task
s_logger.Debug($"Get next chunk from chunk downloader, chunk: {_currentChunk.ChunkIndex + 1}/{_totalChunkCount}" +
$" rows: {_currentChunk.RowCount}, size compressed: {_currentChunk.CompressedSize}," +
$" size decompressed: {_currentChunk.UncompressedSize}");
$" size uncompressed: {_currentChunk.UncompressedSize}");

Check warning on line 121 in Snowflake.Data/Core/SFResultSet.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/SFResultSet.cs#L119-L121

Added lines #L119 - L121 were not covered by tests
BaseResultChunk nextChunk = await _chunkDownloader.GetNextChunkAsync().ConfigureAwait(false);
if (nextChunk != null)
{
Expand All @@ -141,7 +141,7 @@ internal override bool Next()
{
s_logger.Debug($"Get next chunk from chunk downloader, chunk: {_currentChunk.ChunkIndex + 1}/{_totalChunkCount}" +
$" rows: {_currentChunk.RowCount}, size compressed: {_currentChunk.CompressedSize}," +
$" size decompressed: {_currentChunk.UncompressedSize}");
$" size uncompressed: {_currentChunk.UncompressedSize}");
BaseResultChunk nextChunk = Task.Run(async() => await (_chunkDownloader.GetNextChunkAsync()).ConfigureAwait(false)).Result;
if (nextChunk != null)
{
Expand Down Expand Up @@ -294,8 +294,7 @@ internal override object GetValue(int ordinal)
{
UTF8Buffer val = GetObjectInternal(ordinal);
var types = sfResultSetMetaData.GetTypesByIndex(ordinal);
var x = SFDataConverter.ConvertToCSharpVal(val, types.Item1, types.Item2);
return x;
return SFDataConverter.ConvertToCSharpVal(val, types.Item1, types.Item2);
}

private T GetValue<T>(int ordinal)
Expand Down

0 comments on commit d62389c

Please sign in to comment.