Crate mz_repr_test_util

Source
Expand description

Utilities to build objects from the repr crate for unit testing.

These test utilities are relied by crates other than repr.

Functionsยง

datum_to_test_spec
Convert a Datum to a String such that test_spec_to_row can convert the String back into a row containing the same Datum.
extract_literal_string
If the stream starts with a sequence of tokens that can be parsed as a datum, return those tokens as one string.
get_scalar_type_or_default
Parses SqlScalarType from scalar_type_stream or infers it from litval
parse_litval ๐Ÿ”’
parse_vec_of_literals
Parse a token as a vec of strings that can be parsed as datums in a row.
test_spec_to_row
Constructs a Row from a sequence of litval and littyp.