Skip to content

Commit 7644d1f

Browse files
committed
Introduce a Fingerprinter for collector fields schema.
1 parent aee8ac6 commit 7644d1f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/builder/analyzer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ impl AnalyzerContext<'_> {
791791
let scopes = parent_scopes.prepend(scope);
792792
let (struct_mapping, fields_schema) = analyze_struct_mapping(&op.input, scopes)?;
793793
let has_auto_uuid_field = op.auto_uuid_field.is_some();
794+
let fingerprinter = Fingerprinter::default().with(&fields_schema)?;
794795
let collect_op = AnalyzedReactiveOp::Collect(AnalyzedCollectOp {
795796
name: reactive_op.name.clone(),
796797
has_auto_uuid_field,
@@ -801,6 +802,7 @@ impl AnalyzerContext<'_> {
801802
CollectorSchema::from_fields(fields_schema, has_auto_uuid_field),
802803
scopes,
803804
)?,
805+
fingerprinter,
804806
});
805807
async move { Ok(collect_op) }.boxed()
806808
}

src/builder/plan.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ pub struct AnalyzedCollectOp {
9191
pub has_auto_uuid_field: bool,
9292
pub input: AnalyzedStructMapping,
9393
pub collector_ref: AnalyzedCollectorReference,
94+
/// Fingerprinter of the collector's schema. Used to decide when to reuse auto-generated UUIDs.
95+
pub fingerprinter: Fingerprinter,
9496
}
9597

9698
pub enum AnalyzedPrimaryKeyDef {

0 commit comments

Comments
 (0)