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

Method monotonic_source

src/adapter/src/optimize/dataflows.rs:445–469  ·  view source on GitHub ↗

Determine the given source's monotonicity.

(&self, data_source: &DataSourceDesc)

Source from the content-addressed store, hash-verified

443
444 /// Determine the given source's monotonicity.
445 fn monotonic_source(&self, data_source: &DataSourceDesc) -> bool {
446 match data_source {
447 DataSourceDesc::Ingestion { .. } => false,
448 DataSourceDesc::OldSyntaxIngestion {
449 desc, data_config, ..
450 } => data_config.monotonic(&desc.connection),
451 DataSourceDesc::Webhook { .. } => true,
452 DataSourceDesc::IngestionExport {
453 ingestion_id,
454 data_config,
455 ..
456 } => {
457 let source_desc = self
458 .catalog
459 .get_entry_by_item_id(ingestion_id)
460 .source_desc()
461 .expect("ingestion export must reference a source")
462 .expect("ingestion export must reference a source");
463 data_config.monotonic(&source_desc.connection)
464 }
465 DataSourceDesc::Introspection(_)
466 | DataSourceDesc::Progress
467 | DataSourceDesc::Catalog => false,
468 }
469 }
470
471 /// Determine the given objects's monotonicity.
472 ///

Callers 1

Calls 4

monotonicMethod · 0.80
expectMethod · 0.80
get_entry_by_item_idMethod · 0.80
source_descMethod · 0.45

Tested by

no test coverage detected