Package-level declarations

Types

Link copied to clipboard

How much of the store the model actually accounts for.

Link copied to clipboard

Base class for every failure the catalog raises on its own account.

Link copied to clipboard
class CatalogOptions(val maxPaths: Int = DEFAULT_MAX_PATHS, val maxDepth: Int = DEFAULT_MAX_DEPTH, val maxChildren: Int = DEFAULT_MAX_CHILDREN, val textBoundBytes: Int = DEFAULT_TEXT_BOUND_BYTES, val damagedSketches: DamagedSketchPolicy = DamagedSketchPolicy.REPORT)

Tuning for a SchemaCatalog.

Link copied to clipboard

A location shape inside a document: the same list of steps as a app.oreshkov.rabosh.variant.VariantPath, except that array indices are collapsed into a single CatalogStep.AnyElement.

Link copied to clipboard

The catalog has been closed, or used before it was attached to a store. A programming error.

Link copied to clipboard
sealed interface CatalogStep

One step of a CatalogPath: into an object field, or into the elements of an array.

Link copied to clipboard
class CorruptSketchException(message: String, val file: String, val offset: Long = -1, cause: Throwable? = null) : CatalogException

A sketch sidecar cannot be read as one this implementation wrote.

Link copied to clipboard

What to do about a sidecar that will not decode.

Link copied to clipboard

A mergeable estimate of how many distinct values a path holds.

Link copied to clipboard

A path the catalog thinks is worth an index, and why.

Link copied to clipboard
class IndexCandidateOptions(val minObservations: Long = 16, val minPresence: Double = 0.5, val minTypeStability: Double = 0.9, val minDistinct: Long = 2, val minColumnByteShare: Double = 0.05, val limit: Int = 16)

The thresholds SchemaCatalog.indexCandidates applies.

Link copied to clipboard

What kind of sidecar a path is worth.

Link copied to clipboard

What the catalog knows about one path.

Link copied to clipboard

The model the catalog derives from the store's segments.

Link copied to clipboard

The smallest and largest number seen at a path, exactly.

Link copied to clipboard

What has been observed at one path.

Link copied to clipboard
class SchemaCatalog(val directory: Path, val options: CatalogOptions = CatalogOptions.DEFAULT) : SegmentObserver

The model of what is in a store, derived from its documents as they are written.

Link copied to clipboard

Everything one segment's documents said about their shape.

Link copied to clipboard
class TextRange

The smallest and largest text seen at a path, possibly truncated.

Link copied to clipboard

A sidecar was written by a newer build, or at a cardinality-estimator precision this one does not use.

Link copied to clipboard

What is known about the range of values at one path.

Link copied to clipboard
class ValueBoundsBuilder(textBoundBytes: Int)

Accumulates ValueBounds from the scalars at one path.

Link copied to clipboard

The canonical byte string a scalar is identified by.

Properties

Link copied to clipboard
const val DEFAULT_MAX_CHILDREN: Int = 4096

Default ceiling on children visited per container.

Link copied to clipboard
const val DEFAULT_MAX_DEPTH: Int = 32

Default ceiling on how deep into a document the walk goes.

Link copied to clipboard
const val DEFAULT_MAX_PATHS: Int = 1024

Default ceiling on distinct paths tracked per segment.

Link copied to clipboard

Default byte length at which a text bound is truncated.

Functions

Link copied to clipboard
fun catalogPathOf(vararg fields: String): CatalogPath

Convenience for building a path from field names: catalogPathOf("user", "name").

Link copied to clipboard
fun CatalogPath.forEachNodeIn(document: Variant, sink: (VariantNode) -> Unit)

Every node this path stands for in document, in document order.

Link copied to clipboard

The same, materialised.