Class MetricsUtil


  • public class MetricsUtil
    extends java.lang.Object
    • Method Detail

      • createNanValueCounts

        public static java.util.Map<java.lang.Integer,​java.lang.Long> createNanValueCounts​(java.util.stream.Stream<FieldMetrics<?>> fieldMetrics,
                                                                                                 MetricsConfig metricsConfig,
                                                                                                 Schema inputSchema)
        Construct mapping relationship between column id to NaN value counts from input metrics and metrics config.
      • readableMetricsSchema

        public static Schema readableMetricsSchema​(Schema dataTableSchema,
                                                   Schema metadataTableSchema)
        Calculates a dynamic schema for readable_metrics to add to metadata tables. The type will be the struct MetricsUtil.ReadableColMetricsStruct, composed of MetricsUtil.ReadableMetricsStruct for all primitive columns in the data table
        Parameters:
        dataTableSchema - schema of data table
        metadataTableSchema - schema of existing metadata table (to ensure id uniqueness)
        Returns:
        schema of readable_metrics struct