HttpInputFile
struct HttpInputFileImplements Copyable, Movable, RangeReader
- Fields
url: Stringclient: HttpClientheaders: List[Header]: Sent with every request. This is what makes the module reusable for GCS (Authorization: Bearer …) and Azure (x-ms-version) — both reduce to an HTTPS URL plus a fixed set of headers.
__init__
def __init__(out self, var url: String) def __init__(out self, var url: String, var client: HttpClient) location
def location(self) -> String exists
def exists(self) -> Bool length
def length(self) -> Int read_all
def read_all(self) -> List[UInt8] read_range
def read_range(self, offset: Int, length: Int) -> List[UInt8] length bytes from offset. A negative offset is a suffix range (bytes=-N), the way HTTP itself spells "the last N bytes".
read_ranges
def read_ranges(self, ranges: List[ByteRange]) -> List[List[UInt8]] One request per group of nearby ranges rather than one per range.
Connection reuse made a request cheap; this makes it rare. A Parquet
row group whose column chunks are laid out consecutively becomes a
single Range request, and the bytes of the columns the scan skipped
are read and thrown away — which is cheaper than the round trip that
would have avoided them. The groups are fetched at once.