add target types for custom predicates (#223)

* add target types for custom predicates

* simplify

* fix clippy

* fix typo

* don't use ref for NativePredicate

* fix wrong len

* apply feedback from @ax0
This commit is contained in:
Eduard S. 2025-05-07 11:09:38 +02:00 committed by GitHub
parent bf394eada3
commit 726f95483d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 527 additions and 123 deletions

View file

@ -43,7 +43,7 @@ impl ToFields for OperationType {
.collect(),
Self::Custom(CustomPredicateRef { batch, index }) => {
iter::once(F::from_canonical_u64(3))
.chain(batch.hash(params).0)
.chain(batch.id(params).0)
.chain(iter::once(F::from_canonical_usize(*index)))
.collect()
}