Skip to content

Commit 141e829

Browse files
authored
Update buffered stream docs (#538)
1 parent 3dcdd64 commit 141e829

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

csharp/Arrow/ArrowReaderProperties.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public void SetReadDictionary(int columnIndex, bool readDictionary)
7979
/// When enabled, the Arrow reader will pre-buffer necessary regions
8080
/// of the file in-memory. This is intended to improve performance on
8181
/// high-latency filesystems (e.g. Amazon S3).
82+
/// This is enabled by default.
8283
/// </summary>
8384
public bool PreBuffer
8485
{

csharp/ReaderProperties.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ public void Dispose()
2828
}
2929

3030
/// <summary>
31-
/// Whether the buffered stream is enabled for reading.
31+
/// Whether a buffered stream is used for reading.
32+
///
33+
/// This limits the size of reads from the underlying file to limit memory usage in resource
34+
/// constrained environments.
35+
/// Using a buffered stream is disabled by default.
36+
/// Note that this has no effect when reading as Arrow data and <see cref="ParquetSharp.Arrow.ArrowReaderProperties.PreBuffer" /> is enabled.
3237
/// </summary>
3338
public bool IsBufferedStreamEnabled => ExceptionInfo.Return<bool>(Handle, ReaderProperties_Is_Buffered_Stream_Enabled);
3439

3540
/// <summary>
36-
/// The size of the buffer (in bytes) used for reading.
41+
/// The size of the buffer (in bytes) used for the buffered stream. This has no effect when the buffered stream is disabled.
3742
/// </summary>
3843
public long BufferSize
3944
{
@@ -64,7 +69,12 @@ public FileDecryptionProperties? FileDecryptionProperties
6469
}
6570

6671
/// <summary>
67-
/// Enable buffered stream for reading.
72+
/// Enable using a buffered stream for reading.
73+
///
74+
/// This limits the size of reads from the underlying file to limit memory usage in resource
75+
/// constrained environments.
76+
/// The size of the buffer can be controlled with the <see cref="BufferSize" /> parameter.
77+
/// Note that this has no effect when reading as Arrow data and <see cref="ParquetSharp.Arrow.ArrowReaderProperties.PreBuffer" /> is enabled.
6878
/// </summary>
6979
public void EnableBufferedStream()
7080
{
@@ -73,7 +83,7 @@ public void EnableBufferedStream()
7383
}
7484

7585
/// <summary>
76-
/// Disable buffered stream for reading.
86+
/// Disable using a buffered stream for reading.
7787
/// </summary>
7888
public void DisableBufferedStream()
7989
{

0 commit comments

Comments
 (0)