Skip to main content

compute_data_shape_hash

Function compute_data_shape_hash 

Source
pub fn compute_data_shape_hash(
    schema: &Value,
    sketches: Option<&Value>,
) -> Result<Sha256, DataShapeError>
Expand description

Computes the data shape hash from a schema and optional sketches.

In v0.2, this is a minimal implementation:

  • If sketches are provided: H(JCS({schema, sketches}))
  • Otherwise: H(JCS({schema}))

The schema and sketches are canonicalized using BTreeMap for deterministic ordering.