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

Method with_functional_dependencies

datafusion/common/src/dfschema.rs:270–283  ·  view source on GitHub ↗

Assigns functional dependencies.

(
        mut self,
        functional_dependencies: FunctionalDependencies,
    )

Source from the content-addressed store, hash-verified

268
269 /// Assigns functional dependencies.
270 pub fn with_functional_dependencies(
271 mut self,
272 functional_dependencies: FunctionalDependencies,
273 ) -> Result<Self> {
274 if functional_dependencies.is_valid(self.inner.fields.len()) {
275 self.functional_dependencies = functional_dependencies;
276 Ok(self)
277 } else {
278 _plan_err!(
279 "Invalid functional dependency: {:?}",
280 functional_dependencies
281 )
282 }
283 }
284
285 /// Create a new schema that contains the fields from this schema followed by the fields
286 /// from the supplied schema. An error will be returned if there are duplicate field names.

Callers 6

projection_schemaFunction · 0.80
try_newMethod · 0.80
try_new_with_schemaMethod · 0.80
test_filter_is_scalarFunction · 0.80
build_join_schemaFunction · 0.80

Calls 2

is_validMethod · 0.45
lenMethod · 0.45

Tested by 1

test_filter_is_scalarFunction · 0.64