Esempio n. 1
0
// ColumnScanner returns a single scanner across all the Row Groups
func (fd *FileDescriptor) ColumnScanner(colname string) (*column.Scanner, error) {
	elementSchema := fd.Schema().ColumnByName(colname).SchemaElement

	chunks, err := fd.meta.GetColumnChunks(colname)
	if err != nil {
		return nil, fmt.Errorf("could not get columnChunks: %s", err)
	}

	return column.NewScanner(fd, elementSchema, chunks), nil
}
Esempio n. 2
0
func (rg *RowGroupScanner) NewColumnScanners() []*column.Scanner {
	var columnScanners []*column.Scanner

	for idx, columnSchema := range rg.columns {
		chunk := rg.rowGroup.GetColumns()[idx]
		columnScanners = append(columnScanners, column.NewScanner(rg.r, columnSchema, []*thrift.ColumnChunk{chunk}))
	}

	return columnScanners
}