Reader
struct Reader
Methods
new
pub fn new(reader: ReadSeek, batch_size: int = 8192, projection_mask_indices: [int]? = nil): Reader throws IoError, ParquetError, ArrowError
[src]
pub fn new(
reader: ReadSeek, batch_size: int = 8192, projection_mask_indices: [int]? = nil
): Reader throws IoError, ParquetError, ArrowError {
let inner = try _Reader
.new(_create_native_read_seek(reader), batch_size:, projection_mask_indices:);
return Reader { inner };
}
Create a new Parquet reader from a given reader.
new
pub fn new(reader: ReadSeek, batch_size: int = 8192, projection_mask_indices: [int]? = nil): Reader throws IoError, ParquetError, ArrowError
[src]
pub fn new(
reader: ReadSeek, batch_size: int = 8192, projection_mask_indices: [int]? = nil
): Reader throws IoError, ParquetError, ArrowError {
let inner = try _Reader
.new(_create_native_read_seek(reader), batch_size:, projection_mask_indices:);
return Reader { inner };
}
Create a new Parquet reader from a given reader.
Create a new Parquet reader from a given reader.
nv,
use std.fs.File;
use parquet.Reader;
fn main() throws {
let f = try File.open("data.parquet");
let reader = try Reader.new(f);
}
next
pub fn next(self): Record? throws IoError, ParquetError, ArrowError
[src]
pub fn next(self): Record? throws IoError, ParquetError, ArrowError {
return try self.inner.next().map(|record| record as Record);
}
Get the next record from the Parquet file.
next
pub fn next(self): Record? throws IoError, ParquetError, ArrowError
[src]
pub fn next(self): Record? throws IoError, ParquetError, ArrowError {
return try self.inner.next().map(|record| record as Record);
}
Get the next record from the Parquet file.
Get the next record from the Parquet file.
The each batch is a RecordBatch
type, batch size is determined by the batch_size
parameter.
If there is no more record, it will return nil
.
nv,
use std.fs.File;
use parquet.Reader;
fn main() throws {
let f = try File.open("data.parquet");
let reader = try Reader.new(f, batch_size: 1000);
let record = try reader.next();
}
scan
pub fn scan<T>(self): T? throws IoError, ParquetError, ArrowError
[src]
pub fn scan<T>(self): T? throws IoError, ParquetError, ArrowError {
return try self.inner.scan::<T>();
}
Get the next record and deserialize it.
scan
pub fn scan<T>(self): T? throws IoError, ParquetError, ArrowError
[src]
pub fn scan<T>(self): T? throws IoError, ParquetError, ArrowError {
return try self.inner.scan::<T>();
}
Get the next record and deserialize it.
Get the next record and deserialize it.