shreddingAdvice

fun InferredSchema.shreddingAdvice(options: IndexCandidateOptions = IndexCandidateOptions.DEFAULT): List<ShreddingAdvice>

Which paths are worth shredding into typed columns, best first.

The same statistics as SchemaCatalog.indexCandidates, rendered for a different decision. IndexCandidate with IndexKind.SHREDDED_COLUMN already scores this question for the engine's own columns; what was missing is a rendering aimed at a Parquet shredding schema rather than at an index. The two differ in what they emphasise — an index cares about selectivity, a shredding schema cares about type stability and byte share — and in one thing an index never has to say: whether the typed column can stand alone or needs its variant_value fallback.

This emits advice and bytes, and never Parquet. Writing the file is the caller's, with the caller's own writer; the engine's dependency claim is not spent on a Parquet library. The other half of the hand-off is Variant.detached(), which produces the self-contained (metadata, value) pair a Variant column wants.

The published shredding measurements put the read gain at around 8× over unshredded Variant, which is why this is worth generating even for a caller who will shred by hand.

Parameters

options

the same thresholds the index recommendations use, so a path this declines and a path indexCandidates declines are declined for reasons a reader can compare.