Packages

package metric

Type Members

  1. case class IncrementMetric(child: Expression, metric: SQLMetric) extends UnaryExpression with Nondeterministic with Product with Serializable

    IncrementMetric is used to count the number of rows passing through it.

    IncrementMetric is used to count the number of rows passing through it. It can be used to wrap a child expression to count the number of rows. Its currently only accessible via the Scala DSL.

    For example, consider the following expression returning a string literal: If(SomeCondition, IncrementMetric(Literal("ValueIfTrue"), countTrueMetric), IncrementMetric(Literal("ValueIfFalse"), countFalseMetric))

    The SQLMetric countTrueMetric would be incremented whenever the condition SomeCondition is true, and conversely countFalseMetric would be incremented whenever the condition is false.

    The expression does not really compute anything, and merely forwards the value computed by the child expression.

    It is marked as non deterministic to ensure that it retains strong affinity with the child expression, so as to accurately update the metric.

    It takes the following parameters:

    child

    is the actual expression to call.

    metric

    is the SQLMetric to increment.

    Annotations
    @ExpressionDescription()

Ungrouped