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

Function purify_source_format_single

src/sql/src/pure.rs:2296–2352  ·  view source on GitHub ↗
(
    catalog: &dyn SessionCatalog,
    format: &mut Format<Aug>,
    options: &SourceFormatOptions,
    envelope: &Option<SourceEnvelope>,
    storage_configuration: &StorageConfiguration,
)

Source from the content-addressed store, hash-verified

2294}
2295
2296async fn purify_source_format_single(
2297 catalog: &dyn SessionCatalog,
2298 format: &mut Format<Aug>,
2299 options: &SourceFormatOptions,
2300 envelope: &Option<SourceEnvelope>,
2301 storage_configuration: &StorageConfiguration,
2302) -> Result<(), PlanError> {
2303 match format {
2304 Format::Avro(schema) => match schema {
2305 AvroSchema::Csr { csr_connection } => {
2306 purify_csr_connection_avro(
2307 catalog,
2308 options,
2309 csr_connection,
2310 envelope,
2311 storage_configuration,
2312 )
2313 .await?
2314 }
2315 AvroSchema::InlineSchema { .. } => {}
2316 AvroSchema::Glue {
2317 connection,
2318 with_options,
2319 seed,
2320 } => {
2321 purify_glue_connection_avro(
2322 catalog,
2323 options,
2324 connection,
2325 with_options,
2326 seed,
2327 storage_configuration,
2328 )
2329 .await?
2330 }
2331 },
2332 Format::Protobuf(schema) => match schema {
2333 ProtobufSchema::Csr { csr_connection } => {
2334 purify_csr_connection_proto(
2335 catalog,
2336 options,
2337 csr_connection,
2338 envelope,
2339 storage_configuration,
2340 )
2341 .await?;
2342 }
2343 ProtobufSchema::InlineSchema { .. } => {}
2344 },
2345 Format::Bytes
2346 | Format::Regex(_)
2347 | Format::Json { .. }
2348 | Format::Text
2349 | Format::Csv { .. } => (),
2350 }
2351 Ok(())
2352}
2353

Callers 1

purify_source_formatFunction · 0.85

Calls 3

Tested by

no test coverage detected