Skip to content

Commit

Permalink
Respond to PR feedback.
Browse files Browse the repository at this point in the history
Remove unused field and fix async API as well.
  • Loading branch information
eerhardt committed Oct 4, 2019
1 parent 393be8c commit 00fa066
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions csharp/src/Apache.Arrow/Ipc/ArrowFileReaderImplementation.cs
Expand Up @@ -33,11 +33,6 @@ internal sealed class ArrowFileReaderImplementation : ArrowStreamReaderImplement
/// </summary>
private int _recordBatchIndex;

/// <summary>
/// Notes what byte position where the footer data is in the stream
/// </summary>
private long _footerStartPostion;

private ArrowFooter _footer;

public ArrowFileReaderImplementation(Stream stream, MemoryAllocator allocator, bool leaveOpen)
Expand Down Expand Up @@ -77,9 +72,9 @@ protected override async ValueTask ReadSchemaAsync()

await ArrayPool<byte>.Shared.RentReturnAsync(footerLength, async (buffer) =>
{
_footerStartPostion = (int)GetFooterLengthPosition() - footerLength;
long footerStartPostion = GetFooterLengthPosition() - footerLength;
BaseStream.Position = _footerStartPostion;
BaseStream.Position = footerStartPostion;
int bytesRead = await BaseStream.ReadFullBufferAsync(buffer).ConfigureAwait(false);
EnsureFullRead(buffer, bytesRead);
Expand Down Expand Up @@ -110,9 +105,9 @@ protected override void ReadSchema()

ArrayPool<byte>.Shared.RentReturn(footerLength, (buffer) =>
{
_footerStartPostion = GetFooterLengthPosition() - footerLength;
long footerStartPostion = GetFooterLengthPosition() - footerLength;
BaseStream.Position = _footerStartPostion;
BaseStream.Position = footerStartPostion;
int bytesRead = BaseStream.ReadFullBuffer(buffer);
EnsureFullRead(buffer, bytesRead);
Expand Down

0 comments on commit 00fa066

Please sign in to comment.