Skip to content

Commit 9277e4e

Browse files
manuzhangcodex
andcommitted
docs: document stream APIs
Co-authored-by: Codex <codex@openai.com>
1 parent 0d37567 commit 9277e4e

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎src/iceberg/file_scan_task_stream.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace iceberg {
3030

3131
class FileScanTask;
3232

33+
/// \brief Owning stream of file scan tasks.
3334
using FileScanTaskStream = std::unique_ptr<Stream<std::shared_ptr<FileScanTask>>>;
3435

3536
} // namespace iceberg

‎src/iceberg/manifest/manifest_reader.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ class ICEBERG_EXPORT ManifestReader {
154154
/// streaming.
155155
class ICEBERG_EXPORT SupportsManifestEntryStreaming {
156156
public:
157+
/// \brief Destroy this streaming extension.
157158
virtual ~SupportsManifestEntryStreaming() = default;
158159

159160
/// \brief Lazily read manifest entries.

‎src/iceberg/manifest/manifest_reader_internal.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ class ManifestReaderImpl : public ManifestReader, public SupportsManifestEntrySt
6666

6767
Result<std::vector<ManifestEntry>> LiveEntries() override;
6868

69+
/// \brief Lazily read manifest entries.
6970
Result<ManifestEntryStream> EntriesStream() override;
7071

72+
/// \brief Lazily read only live (non-deleted) manifest entries.
7173
Result<ManifestEntryStream> LiveEntriesStream() override;
7274

7375
ManifestReader& Select(const std::vector<std::string>& columns) override;

‎src/iceberg/util/stream.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,22 @@ namespace iceberg {
4444
template <typename T>
4545
class Stream {
4646
public:
47+
/// \brief Destroy this stream and release its producer resources.
4748
virtual ~Stream() = default;
4849

50+
/// \brief Construct a stream in its initial state.
4951
Stream() = default;
52+
53+
/// \brief Streams cannot be copied.
5054
Stream(const Stream&) = delete;
55+
56+
/// \brief Streams cannot be copy-assigned.
5157
Stream& operator=(const Stream&) = delete;
58+
59+
/// \brief Move a stream and its terminal state.
5260
Stream(Stream&&) noexcept = default;
61+
62+
/// \brief Move-assign a stream and its terminal state.
5363
Stream& operator=(Stream&&) noexcept = default;
5464

5565
/// \brief Return the next value, or std::nullopt when the stream is exhausted.

0 commit comments

Comments
 (0)