MCPcopy Create free account
hub / github.com/apache/datafusion / try_new

Method try_new

datafusion/expr-common/src/statistics.rs:314–322  ·  view source on GitHub ↗
(interval: Interval)

Source from the content-addressed store, hash-verified

312
313impl UniformDistribution {
314 fn try_new(interval: Interval) -> Result<Self> {
315 assert_ne_or_internal_err!(
316 interval.data_type(),
317 DataType::Boolean,
318 "Construction of a boolean `Uniform` distribution is prohibited, create a `Bernoulli` distribution instead."
319 );
320
321 Ok(Self { interval })
322 }
323
324 pub fn data_type(&self) -> DataType {
325 self.interval.data_type()

Callers

nothing calls this directly

Calls 4

contains_valueMethod · 0.80
data_typeMethod · 0.45
is_nullMethod · 0.45
ltMethod · 0.45

Tested by

no test coverage detected