Skip to content

StatsProvider

Creating Instance

StatsProvider takes the following to be created:

StatsProvider is created alongside DataFiltersBuilder.

Statistic Column Function

StatsProvider is given a Statistic Column Function when created.

StatsColumn => Option[Column]

The function is always getStatsColumnOpt.

getPredicateWithStatType

getPredicateWithStatType(
  pathToColumn: Seq[String],
  statType: String)(
  f: Column => Column): Option[DataSkippingPredicate]

getPredicateWithStatType getPredicateWithStatsColumn with a StatsColumn for the given statType and pathToColumn, and the given f function.


getPredicateWithStatType is used when:

getPredicateWithStatsColumn

getPredicateWithStatsColumn(
  statCol: StatsColumn)(
  f: Column => Column): Option[DataSkippingPredicate]

getPredicateWithStatsColumn uses the getStat function to look up the given statCol and, if found (stat), creates a DataSkippingPredicate with the following:

  • The result of applying the f function to stat
  • The given statCol

getPredicateWithStatTypes

getPredicateWithStatTypes(
  pathToColumn: Seq[String],
  statType1: String,
  statType2: String)(
  f: (Column, Column) => Column): Option[DataSkippingPredicate]
getPredicateWithStatTypes(
  pathToColumn: Seq[String],
  statType1: String,
  statType2: String,
  statType3: String)(
  f: (Column, Column, Column) => Column): Option[DataSkippingPredicate]

getPredicateWithStatTypes getPredicateWithStatsColumns with a StatsColumn for all the given statTypes and pathToColumn, and the given f function.


getPredicateWithStatTypes is used when: