mz_storage::sink::kafka

Function evaluate_partition_by

Source
fn evaluate_partition_by(partition_by: &MirScalarExpr, row: &[Datum<'_>]) -> u64
Expand description

Evaluates a partition by expression on the given row, returning the hash value to use for partition assignment.

The provided expression must have type Int32, Int64, UInt32, or UInt64. If the expression produces an error when evaluated, or if the expression is of a signed integer type and produces a negative value, this function returns 0.