public SchemaMetadata parseMetadata(Model model, BanyanDBStorageConfig config, DownSamplingConfigService configService) {
        if (!model.isTimeSeries()) {
            return new SchemaMetadata(BanyanDB.PropertyGroup.PROPERTY.getName(), model.getName(), Kind.PROPERTY, DownSampling.None, config.getProperty());
        }
        if (model.isRecord()) { // stream
            BanyanDB.StreamGroup streamGroup = model.getBanyanDBModelExtension().getStreamGroup();
                switch (streamGroup) {
                    case RECORDS_LOG:
                        return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS_LOG.getName(),
                                model.getName(),
                                Kind.STREAM,
                                model.getDownsampling(),
                                config.getRecordsLog());
                    case RECORDS_TRACE:
                        return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS_TRACE.getName(),
                                model.getName(),
                                Kind.STREAM,
                                model.getDownsampling(),
                                config.getRecordsTrace());
                    case RECORDS_ZIPKIN_TRACE:
                        return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS_ZIPKIN_TRACE.getName(),
                                model.getName(),
                                Kind.STREAM,
                                model.getDownsampling(),
                                config.getRecordsZipkinTrace());
                    case RECORDS_BROWSER_ERROR_LOG:
                        return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS_BROWSER_ERROR_LOG.getName(),
                                model.getName(),
                                Kind.STREAM,
                                model.getDownsampling(),
                                config.getRecordsBrowserErrorLog());
                    case RECORDS:
                        return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS.getName(),
                                model.getName(),
                                Kind.STREAM,
                                model.getDownsampling(),
                                config.getRecordsBrowserErrorLog());
                    default:
                        throw new IllegalStateException("unknown stream group " + streamGroup);

                }
        }

        if (model.getBanyanDBModelExtension().isIndexMode()) {
            return new SchemaMetadata(BanyanDB.MeasureGroup.METADATA.getName(), model.getName(), Kind.MEASURE,
                    model.getDownsampling(),
                    config.getMetadata());
        }

        switch (model.getDownsampling()) {
            case Minute:
                return new SchemaMetadata(BanyanDB.MeasureGroup.METRICS_MINUTE.getName(),
                        model.getName(),
                        Kind.MEASURE,
                        model.getDownsampling(),
                        config.getMetricsMin());
            case Hour:
                if (!configService.shouldToHour()) {
                    throw new UnsupportedOperationException("downsampling to hour is not supported");
                }
                return new SchemaMetadata(BanyanDB.MeasureGroup.METRICS_HOUR.getName(),
                        model.getName(),
                        Kind.MEASURE,
                        model.getDownsampling(),
                        config.getMetricsHour());
            case Day:
                if (!configService.shouldToDay()) {
                    throw new UnsupportedOperationException("downsampling to day is not supported");
                }
                return new SchemaMetadata(BanyanDB.MeasureGroup.METRICS_DAY.getName(),
                        model.getName(),
                        Kind.MEASURE,
                        model.getDownsampling(),
                        config.getMetricsDay());
            default:
                throw new UnsupportedOperationException("unsupported downSampling interval:" + model.getDownsampling());
        }
    }
Parse TagSpec from {@link ModelColumn}

@param modelColumn the column in the model to be parsed
@return a typed tag spec
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java