pub(super) fn collect_json2_rewrite_plans_from_parquet(
metadata: &RegionMetadataRef,
parquet_metadata: &[Arc<ParquetMetaData>],
) -> Result<HashMap<String, Json2RewritePlan>>Expand description
Builds the JSON2 rewrite plans for a compaction.
Type hints from current region metadata are always retained. Existing explicit dynamic paths
from all input SST schemas are ranked once to produce a fixed layout; paths found only in a v2
remainder are deliberately not promoted. rewrite_json2_batch decodes inputs and rewrites
them according to these plans. Non-JSON2 columns are omitted from the returned map.
Returns an error when a JSON2 column has invalid or missing extension metadata, or when its output layout is not v2. Legacy region metadata is upgraded in memory by the region opener before compaction reaches this function.