in src/main/scala/com/amazon/deequ/analyzers/StateProvider.scala [143:185]
override def load[S <: State[_]](analyzer: Analyzer[S, _]): Option[S] = {
val identifier = toIdentifier(analyzer)
val state: Any = analyzer match {
case _ : Size => NumMatches(loadLongState(identifier))
case _ : Completeness | _ : Compliance | _ : PatternMatch => loadLongLongState(identifier)
case _ : Sum => SumState(loadDoubleState(identifier))
case _ : Mean => loadDoubleLongState(identifier)
case _ : Minimum => MinState(loadDoubleState(identifier))
case _ : Maximum => MaxState(loadDoubleState(identifier))
case _ : MaxLength => MaxState(loadDoubleState(identifier))
case _ : MinLength => MinState(loadDoubleState(identifier))
case _ : FrequencyBasedAnalyzer | _ : Histogram => loadDataframeLongState(identifier)
case _ : DataType => DataTypeHistogram.fromBytes(loadBytes(identifier))
case _ : ApproxCountDistinct =>
DeequHyperLogLogPlusPlusUtils.wordsFromBytes(loadBytes(identifier))
case _ : Correlation => loadCorrelationState(identifier)
case _ : StandardDeviation => loadStandardDeviationState(identifier)
case _: ApproxQuantile =>
val percentileDigest = ApproximatePercentile.serializer.deserialize(loadBytes(identifier))
ApproxQuantileState(percentileDigest)
case _ =>
throw new IllegalArgumentException(s"Unable to load state for analyzer $analyzer.")
}
Option(state.asInstanceOf[S])
}