use of io.trino.spi.type.LongTimestamp in project trino by trinodb.
the class GenericHiveRecordCursor method parseObjectColumn.
private void parseObjectColumn(int column) {
loaded[column] = true;
Object fieldData = rowInspector.getStructFieldData(rowData, structFields[column]);
if (fieldData == null) {
nulls[column] = true;
} else {
Type type = types[column];
if (type.getJavaType() == Block.class) {
objects[column] = getBlockObject(type, fieldData, fieldInspectors[column]);
} else if (type instanceof TimestampType) {
Timestamp timestamp = (Timestamp) ((PrimitiveObjectInspector) fieldInspectors[column]).getPrimitiveJavaObject(fieldData);
objects[column] = longTimestamp(timestamp, column);
} else {
throw new IllegalStateException("Unsupported type: " + type);
}
nulls[column] = false;
}
}
Aggregations