Search in sources :

Example 1 with PcapTypes

use of org.apache.drill.exec.store.pcap.schema.PcapTypes in project drill by axbaretto.

the class PcapRecordReader method initCols.

private ImmutableList<ProjectedColumnInfo> initCols(final Schema schema) {
    ImmutableList.Builder<ProjectedColumnInfo> pciBuilder = ImmutableList.builder();
    ColumnDto column;
    for (int i = 0; i < schema.getNumberOfColumns(); i++) {
        column = schema.getColumnByIndex(i);
        final String name = column.getColumnName().toLowerCase();
        final PcapTypes type = column.getColumnType();
        TypeProtos.MinorType minorType = TYPES.get(type);
        ProjectedColumnInfo pci = getProjectedColumnInfo(column, name, minorType);
        pciBuilder.add(pci);
    }
    return pciBuilder.build();
}
Also used : ImmutableList(com.google.common.collect.ImmutableList) MinorType(org.apache.drill.common.types.TypeProtos.MinorType) PcapTypes(org.apache.drill.exec.store.pcap.schema.PcapTypes) TypeProtos(org.apache.drill.common.types.TypeProtos) ColumnDto(org.apache.drill.exec.store.pcap.dto.ColumnDto)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 TypeProtos (org.apache.drill.common.types.TypeProtos)1 MinorType (org.apache.drill.common.types.TypeProtos.MinorType)1 ColumnDto (org.apache.drill.exec.store.pcap.dto.ColumnDto)1 PcapTypes (org.apache.drill.exec.store.pcap.schema.PcapTypes)1