Crate mz_repr

source ·
Expand description

Fundamental data representation.

This module contains the types for representing data in Materialize that all layers of the stack can understand. Think of it as the lingua franca: individual layers may use different representations internally, but they all agree to use this representation at their boundaries.

  • The core value type is the Datum enum, which represents a literal value.
  • Row extends a Datum horizontally, and has features for efficiently doing so.
  • RelationDesc describes what it takes to extend a Row vertically, and corresponds most closely to what is returned from querying our dataflows

Re-exports

Modules

  • Abstract data types.
  • A set of traits for modeling things that can be explained by a SQL EXPLAIN statement.
  • Provides fixed-length representations for data composed of Datums of fixed-length types. These representations are aimed at being more efficient in memory usage than Row by relying on statically selected container lengths. Traits are provided that allow these representations to be made into instances of Row or created from Rows. The traits are trivially implemented for Row itself, providing a uniform interface to describe Rows or fixed-length containers standing in for them.
  • Namespace constants to share between high- and low-levels of the system.
  • Facilities for defining optimizer feature flags.
  • Routines for converting datum values to and from their string representation.
  • Custom Protobuf types for the url crate.

Structs

Enums

Traits

Functions

  • Generate an arbitrary PropDatum.
  • Number of bytes required by a list of datums. This computes the size that would be required if the given datums were packed into a list.
  • Number of bytes required by the datum. This is used to optimistically pre-allocate buffers for packing rows.
  • Number of bytes required by a sequence of datums.
  • This returns true if we don’t care to keep stats for this column type (for now). We’ll have to remove this if/when we start actually using the schema’d part encoding.
  • Read a datum starting at byte offset.
  • Return the number of bytes these Datums would use if packed as a Row.

Type Aliases

  • System-wide record count difference type.