use of org.apache.drill.exec.store.openTSDB.client.OpenTSDBTypes in project drill by axbaretto.
the class OpenTSDBRecordReader method initCols.
private void initCols(Schema schema) throws SchemaChangeException {
ImmutableList.Builder<ProjectedColumnInfo> pciBuilder = ImmutableList.builder();
for (int i = 0; i < schema.getColumnCount(); i++) {
ColumnDTO column = schema.getColumnByIndex(i);
final String name = column.getColumnName();
final OpenTSDBTypes type = column.getColumnType();
TypeProtos.MinorType minorType = TYPES.get(type);
if (isMinorTypeNull(minorType)) {
String message = String.format("A column you queried has a data type that is not currently supported by the OpenTSDB storage plugin. " + "The column's name was %s and its OpenTSDB data type was %s. ", name, type.toString());
throw UserException.unsupportedError().message(message).build(log);
}
ProjectedColumnInfo pci = getProjectedColumnInfo(column, name, minorType);
pciBuilder.add(pci);
}
projectedCols = pciBuilder.build();
}
use of org.apache.drill.exec.store.openTSDB.client.OpenTSDBTypes in project drill by apache.
the class OpenTSDBRecordReader method initCols.
private void initCols(Schema schema) throws SchemaChangeException {
ImmutableList.Builder<ProjectedColumnInfo> pciBuilder = ImmutableList.builder();
for (int i = 0; i < schema.getColumnCount(); i++) {
ColumnDTO column = schema.getColumnByIndex(i);
final String name = column.getColumnName();
final OpenTSDBTypes type = column.getColumnType();
TypeProtos.MinorType minorType = TYPES.get(type);
if (isMinorTypeNull(minorType)) {
String message = String.format("A column you queried has a data type that is not currently supported by the OpenTSDB storage plugin. " + "The column's name was %s and its OpenTSDB data type was %s. ", name, type.toString());
throw UserException.unsupportedError().message(message).build(logger);
}
ProjectedColumnInfo pci = getProjectedColumnInfo(column, name, minorType);
pciBuilder.add(pci);
}
projectedCols = pciBuilder.build();
}
Aggregations