# Reproduce the native Delta lessons

Requires uv and Java 17. Extract this archive and run from its root.
Set JAVA_HOME to your Java 17 installation if needed. Shell examples use fish.

```fish
set -x SPARK_LOCAL_IP 127.0.0.1
uv run reproduce.py --source weather --output native --verify
```

This reads every captured snapshot with Spark, checks every source value, verifies
original bitmap framing/CRC and independent Roaring positions, and reruns all three
writer schedules in a new temporary directory. It does not rewrite these tables.

To create a separate fresh capture:

```fish
uv run reproduce.py --source weather --output fresh
```

Random file names, transaction IDs and timestamps will differ. Logical rows,
bitmap positions and the pinned client outcomes are asserted. Generating will
refuse an output directory that already exists.

The two branches are intentionally distinct: native/table enables DVs from the
original eighteen-row version 1; native/overlap, native/append and native/append-pair
use the original non-DV protocol. Writer schedules overlap snapshot lifetimes,
not operating-system threads. Errors are recorded in native/proof.json; failed
transactions do not create fake log commits. Failed replacement Parquet files
are kept as inspectable orphans. Table storage cleanup is not demonstrated.

Decoder scope: one zero-high-key 64-bit bucket and a sparse Roaring array container.
Other legal DV encodings and storage modes are not implemented by the browser lesson.
