in java/clickhouse-connector/src/main/java/com/epam/deltix/timebase/connector/clickhouse/algos/SchemaProcessor.java [200:227]
private ColumnDeclarationEx columnFromArray(RecordClassDescriptor descriptor, DataFieldInfo dataField) {
com.epam.deltix.qsrv.hf.pub.md.ArrayDataType arrayDataType = (com.epam.deltix.qsrv.hf.pub.md.ArrayDataType) dataField.getType();
DataType tbDataType = arrayDataType.getElementDataType();
String columnName = getColumnName(descriptor, dataField);
if (tbDataType instanceof com.epam.deltix.qsrv.hf.pub.md.ArrayDataType) {
throw new UnsupportedOperationException();
} else if (tbDataType instanceof BinaryDataType) {
throw new UnsupportedOperationException();
} else if (tbDataType instanceof ClassDataType) {
ClassDataType classDataType = (ClassDataType) tbDataType;
RecordClassDescriptor[] descriptors = classDataType.getDescriptors();
List<ColumnDeclaration> columns = getColumnDeclarationsFromClass(descriptors);
NestedDataType dataType = new NestedDataType(columns);
return new ColumnDeclarationEx(columnName, dataType);
} else if (tbDataType instanceof BooleanDataType || tbDataType instanceof CharDataType || tbDataType instanceof DateTimeDataType
|| tbDataType instanceof EnumDataType || tbDataType instanceof FloatDataType || tbDataType instanceof IntegerDataType
|| tbDataType instanceof TimeOfDayDataType || tbDataType instanceof VarcharDataType) {
} else {
throw new UnsupportedOperationException(String.format("Cannot convert data type '%s'", tbDataType.getClass().getName()));
}
return new ColumnDeclarationEx(columnName,
new ArraySqlType(convertTimebaseDataTypeToClickhouseDataType(tbDataType)));
}