public static TimescaleColumn convert()

in timescaledb-connector/src/main/java/com/epam/deltix/timebase/connector/util/MigrationUtils.java [27:50]


    public static TimescaleColumn convert(DataFieldInfo dataField, String parentFieldName, String descriptorName) {
        if (dataField == null) {
            throw new IllegalArgumentException("Timebase data field is not specified.");
        }

        DataTypeInfo dataType = dataField.getDataType();
        String name = dataField.getName().toString();
        String fieldName;
        if (parentFieldName != null) {
            fieldName = parentFieldName + "_" + name;
        } else {
            fieldName = name;
        }

        TimescaleColumn.TimescaleDataType timescaleDataType = getTimescaleDataType(dataType);
        boolean isArray = isArray(dataType);

        return TimescaleColumn.builder()
                .name(fieldName)
                .relatedDescriptors(descriptorName == null ? Collections.emptyList() : Collections.singletonList(descriptorName))
                .dataType(timescaleDataType)
                .isArray(isArray)
                .build();
    }