MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / apply_demand

Function apply_demand

src/repr/src/relation.rs:2404–2414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2402 #[mz_ore::test]
2403 #[cfg_attr(miri, ignore)]
2404 fn apply_demand() {
2405 let desc = RelationDesc::builder()
2406 .with_column("a", SqlScalarType::String.nullable(true))
2407 .with_column("b", SqlScalarType::Int64.nullable(false))
2408 .with_column("c", SqlScalarType::Time.nullable(false))
2409 .finish();
2410 let desc = desc.apply_demand(&BTreeSet::from([0, 2]));
2411 assert_eq!(desc.arity(), 2);
2412 // TODO(parkmycar): Move validate onto RelationDesc.
2413 VersionedRelationDesc::new(desc).validate();
2414 }
2415
2416 #[mz_ore::test]
2417 #[cfg_attr(miri, ignore)]

Callers

nothing calls this directly

Calls 5

with_columnMethod · 0.80
apply_demandMethod · 0.80
finishMethod · 0.45
nullableMethod · 0.45
validateMethod · 0.45

Tested by

no test coverage detected