Podlog language v1 (#225)

* Initial commit for Podlog language

* Spell-checker thinks that 'lits' is a bad abbreviation for 'literals'

* Enable SetContains/SetNotContains

* Update language based on review feedback

* Typo/comment fix

* Make native predicates case-sensitive

* Enforce max batch size in CustomPredicateBatchBuilder

* Remove some unnecessary checks for things handled by the grammar

* Clean up more unnecessary error-checking

* Typo

* Simplify hex processing

* Replace various errors with unreachable!()

* Translate from big-endian hex string to little-endian RawValue

* Update hex en/decoding functions
This commit is contained in:
Rob Knight 2025-06-07 07:17:23 +02:00 committed by GitHub
parent e8edbbc1c5
commit 541c264586
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 2259 additions and 29 deletions

View file

@ -373,20 +373,12 @@ impl fmt::Display for CustomPredicate {
pub struct CustomPredicateBatch {
id: Hash,
pub name: String,
predicates: Vec<CustomPredicate>,
pub(crate) predicates: Vec<CustomPredicate>,
}
impl ToFields for CustomPredicateBatch {
fn to_fields(&self, params: &Params) -> Vec<F> {
// all the custom predicates in order
// TODO think if this check should go into the StatementTmpl creation,
// instead of at the `to_fields` method, where we should assume that the
// values are already valid
if self.predicates.len() > params.max_custom_batch_size {
panic!("Predicate batch exceeds maximum size");
}
let pad_pred = CustomPredicate::empty();
let fields: Vec<F> = self
.predicates