MCPcopy Create free account
hub / github.com/apache/arrow / SkipStartingEmptyPages

Function SkipStartingEmptyPages

cpp/src/arrow/filesystem/azurefs.cc:1013–1017  ·  view source on GitHub ↗

Usually if the first page is empty it means there are no results. This was assumed in several places in AzureFilesystem. The Azure docs do not guarantee this and we have evidence (GH-49043) that there can be subsequent non-empty pages. Applying `SkipStartingEmptyPages` on a paged response corrects this assumption.

Source from the content-addressed store, hash-verified

1011// evidence (GH-49043) that there can be subsequent non-empty pages.
1012// Applying `SkipStartingEmptyPages` on a paged response corrects this assumption.
1013void SkipStartingEmptyPages(Blobs::ListBlobContainersPagedResponse& paged_response) {
1014 while (paged_response.HasPage() && paged_response.BlobContainers.empty()) {
1015 paged_response.MoveToNextPage();
1016 }
1017}
1018void SkipStartingEmptyPages(Blobs::ListBlobsPagedResponse& paged_response) {
1019 while (paged_response.HasPage() && paged_response.Blobs.size() == 0) {
1020 paged_response.MoveToNextPage();

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected