Diagnostics

Every coded diagnostic a verb can return, with what it means and how to fix it.

The codes a verb can return in its diagnostics, by area.

Values and encodings

OVERFLOW

error. The exact result does not fit its type.

Widen the type (a larger decimal precision, Int64 to Decimal128) or use the _wrapping variant by name.

DIVISION_BY_ZERO

error. A division or remainder by zero.

Filter or replace zero divisors first, e.g. with nullif.

DECIMAL_PRECISION

error. A decimal precision outside 1..=38, or more digits than the precision allows.

Use a precision from 1 to 38 that holds the value's digits.

DECIMAL_SCALE

error. A decimal scale above the precision or above 38.

Round an operand to a smaller scale first (round, rescale).

PARSE_DECIMAL

error. Text that is not a decimal number.

Write [-]digits[.digits][e[+-]digits].

PARSE_DATE

error. Text that is not a date.

Write YYYY-MM-DD; years outside 0000–9999 as +YYYYY or -YYYYY.

PARSE_TIMESTAMP

error. Text that is not a timestamp.

Write YYYY-MM-DDTHH:MM:SS[.ffffff] and Z or ±HH:MM (no zone for a local timestamp).

PARSE_DURATION

error. Text that is not a duration.

Write ISO 8601, e.g. PT1H30M or -PT0.5S.

TEMPORAL_RANGE

error. A date or time outside the supported range.

Keep dates within the 32-bit day range and timestamps within ±292,000 years.

NOT_FINITE

error. A NaN or an infinity converted to an exact type.

Filter or replace them first (is_nan, a comparison with a bound).

TYPE_MISMATCH

error. A value, child or buffer of another type than declared.

Cast the value to the declared type, or declare the type it has.

LENGTH_MISMATCH

error. Lengths that must agree do not.

Give every column of a table, and every mask, the same number of rows.

INDEX_OUT_OF_BOUNDS

error. A row index past the end.

Use indices below the row count.

OFFSET_OVERFLOW

error. Offsets would pass 2^31 - 1 bytes or items.

Split the column into smaller batches.

INVALID_LAYOUT

error. Buffers that are not a valid Arrow layout.

Rebuild the column through hint's constructors.

NULL_IN_NON_NULLABLE

error. A null in a field declared not nullable.

Fill the nulls (fill_null) or declare the field nullable.

INVALID_UTF8

error. Utf8 bytes that are not UTF-8.

Read the column as Binary, or repair the text.

CONCAT_EMPTY

error. A concatenation of nothing.

Pass at least one column or table.

DUPLICATE_FIELD_NAME

error. Two fields with one name.

Rename one of the fields.

JSON_SYNTAX

error. Text that is not JSON.

Send RFC 8259 JSON.

JSON_DEPTH

error. JSON nested deeper than 512.

Flatten the document.

JSON_DUPLICATE_KEY

error. A JSON object with a repeated member name.

Give each member of an object a distinct name.

JSON_NUMBER_RANGE

error. A JSON number past the double range.

Send large or exact numbers as strings.

JSON_UTF8

error. JSON that is not UTF-8, or a lone surrogate escape.

Encode the text as UTF-8; escape characters outside the BMP as surrogate pairs.

ENCODING_MAGIC

error. Bytes that are not a hint.value/1 encoding.

Send bytes written by encode.

ENCODING_KIND

error. An encoded value of a kind not accepted here.

Send a value of the kind the verb takes.

ENCODING_TRUNCATED

error. An encoding that ends early.

Send the whole encoding.

ENCODING_SCHEMA

error. An encoding whose schema is not a schema.

Send bytes written by encode.

ENCODING_LAYOUT

error. An encoding whose buffers are not a valid layout.

Send bytes written by encode.

ENCODING_HEADER

error. A record (a sketch, split, prep or model) whose header is not a JSON object.

Send bytes written by the value's own encoder.

ENCODING_NOT_CANONICAL

error. A valid encoding that is not the canonical one.

Re-encode the value with encode; only canonical bytes have the value's hash.

SEMANTIC_STORAGE

error. A semantic type on a storage type it does not fit.

Use a storage type the semantic type accepts (docs: semantic types).

SEMANTIC_PARAMETER

error. A semantic type's parameter is missing or malformed.

Give the parameter in its form (UCUM unit, ISO 4217 currency, AUTHORITY:CODE).

SORT_UNSUPPORTED_TYPE

error. A sort or grouping key of a type with no order (Map).

Sort or group by the map's entries, or by another column.

REGEX_SYNTAX

error. A regular expression that is malformed: an unclosed group or class, nothing to repeat, a backwards range.

Fix the pattern at the offset given; escape punctuation meant literally with \.

REGEX_UNSUPPORTED

error. Regular-expression syntax outside hint's linear-time subset: backreferences, lookaround, named groups, inline flags, other escapes.

Rewrite the pattern with literals, classes, quantifiers, |, groups and anchors (docs: hint-core::regex).

REGEX_TOO_LARGE

error. A regular expression that compiles too large: a repeat count above 1000, nesting deeper than 100, or more than 20,000 instructions.

Use smaller repeat counts or split the check into several rules.

Expressions

TYPE_ARGUMENT

error. An argument of a type the function does not take.

Pass the type the function's signature names, or cast the argument.

TYPE_NO_COMMON

error. Two values that must mix have no common type.

Cast one of them to the other's type.

TYPE_IMPLICIT_CAST

error. An exact and a binary number mixed without a cast.

Cast the decimal to Float64, or the Float64 to a Decimal128, explicitly.

TYPE_INTEGER_DIVISION

error. Int64 / Int64 has no exact result type.

Use div_trunc or div_floor, or cast an operand to Decimal128 or Float64.

TZ_MISMATCH

error. Timestamps displayed in different zones mixed in one value.

Convert one column to the other's zone first.

TZ_NAIVE_COMPARE

error. A wall-clock time compared or mixed with an instant.

Convert the LocalTimestamp to a Timestamp with an explicit zone and policy.

FUNCTION_UNKNOWN

error. A function the table does not have.

Use one of the nearest names given, or a function of the catalogue.

FUNCTION_ARITY

error. A call with the wrong number of arguments.

Pass the arguments the function's signature lists.

OPTION_INVALID

error. A call option that is missing or malformed.

Give the option in the form the function documents.

CAST_UNSUPPORTED

error. A cast between types that have none.

Cast through a type both convert to, e.g. Utf8.

EXPR_SHAPE

error. JSON that is not an expression.

Write {"col": i}, {"lit": v, "type": t} or {"fn": name, "args": [...]}.

LITERAL_INVALID

error. A literal value that is not a value of its type.

Write the value in its type's literal form (docs: expressions).

SCOPE_COLUMN

error. A column ordinal past the input's columns.

Use an ordinal of the input; the message lists its columns.

SCOPE_NAME

error. A column whose name is not the one given.

Use the ordinal the message names, or drop the name.

FUNCTION_CONTEXT

error. An aggregate or window function where it cannot stand.

Use aggregates as measures of table_aggregate and window functions in table_window.

TZ_UNKNOWN

error. A time zone name the tz database does not have.

Use an IANA name such as Europe/Berlin; tz::names() lists them, tz::version() the tzdb release.

TZ_AMBIGUOUS

error. A wall-clock time the zone shows twice (the clocks fall back).

Pass option ambiguous: earlier or later.

TZ_NONEXISTENT

error. A wall-clock time the zone skips (the clocks spring forward).

Pass option nonexistent: shift_forward or shift_backward.

CAST_PARSE

error. Text a cast cannot read as its target type (Int64, Float64, Bool), or bytes that are not UTF-8.

Clean the text first, or pass option on_error: "null" to the cast.

Plans

PLAN_SHAPE

error. JSON that is not a plan.

Send {"version": "hint.plan/1", "nodes": [...], "outputs": {...}}.

PLAN_VERSION

error. A plan of another IR version.

Set version to "hint.plan/1".

PLAN_DUPLICATE_ID

error. Two nodes with one id.

Give every node its own id.

PLAN_UNKNOWN_NODE

error. An input or output naming no node.

Use an id of the plan's nodes; the message lists them.

PLAN_VALUE_KIND

error. An input of the wrong kind: a split, prep or model where a table goes, or the reverse.

Give each op the inputs it takes, in order.

PLAN_SCHEMA_DYNAMIC

error. A relational op over a prep_apply's output, whose columns are known only when it runs.

Fit and apply models on it, or run the prep first and read its result as a table.

PLAN_ARITY

error. A node with the wrong number of inputs.

read takes none; join and set two; every other op one.

PLAN_CYCLE

error. A node that depends on itself.

Remove the cycle: a plan is a directed acyclic graph.

PLAN_UNUSED_NODE

error. A node that reaches no output.

Remove the node, or name it in outputs.

PLAN_OP_UNKNOWN

error. An op the IR does not have.

Use one of the nearest ops given, or an op on the plan ops page.

PLAN_PARAM

error. A parameter that is missing, unknown or malformed.

Give the op's parameters as the catalogue lists them.

SAMPLE_NEEDS_SEED

error. A sample without a seed.

Pass seed: nothing in hint is random by default.

PLAN_INPUT_UNKNOWN

error. A read of a table the host did not give.

Read one of the inputs the message lists, or pass the table.

PREDICATE_NOT_BOOL

error. A filter, residual or measure filter that is not Bool.

Compare the value (gt, eq, is_not_null, …) to get a Bool.

TYPE_NOT_ORDERABLE

error. A sort, grouping or distinct key of a type with no order or equality (a map).

Key on one of its entries instead.

COLUMN_DUPLICATE

error. Two output columns of one name.

Rename one: project the input first, or give the column another name.

MEASURE_NOT_AGGREGATE

error. A measure or window column whose top is not an aggregate (or window) call.

Wrap it in an aggregate (first, sum, …), or add it to group_by.

ORDERED_AGGREGATE_NEEDS_ORDER

error. An order-dependent function (first, list, row_number, lag, …) without an ordering.

Give the measure's or the window's order_by.

SET_SCHEMA_MISMATCH

error. Set inputs whose columns do not match by position.

Project both inputs to the same column count and types.

UNNEST_NOT_LIST

error. An unnest of a column that is not a list.

Name a List column by its ordinal.

OP_UNAVAILABLE

error. An op the IR names that this version cannot derive or run.

Use the ops the plan ops page lists for this version.

Running plans

CAPABILITY_UNAVAILABLE

error. A verb or op this build leaves out: learning in hint_core.wasm.

Load hint_ml.wasm for learning.

JOIN_NOT_SINGLE

error. A left row of a single join that matches more than one right row.

Make the right keys unique (distinct or aggregate first), or use a left join.

EXEC_SCHEMA_DRIFT

error. A learning op built another schema than plan_check derived: a bug in hint, not in the plan.

Report the plan; the run refused rather than return a table its check did not promise.

AGGREGATE_NOT_DECOMPOSABLE

error. A measure (or grouping sets) asked to shard whose partial states do not merge to the bytes of a single run: a Float64 sum, a variance, an ordered aggregate.

Shard count, count_all, bool_and, bool_or, min, max, and sum and mean over Int64; aggregate the rest in one place.

AGGREGATE_STATE_MISMATCH

error. Tables given to table_aggregate_merge that are not states of one aggregate.

Merge the outputs of table_aggregate_partial for one set of parameters, in shard order.

PLAN_OUTPUT_KIND

error. A plan output that is a split, prep or model, asked of plan_run, which returns tables.

Use plan_run_values for plans whose outputs are values.

Reading, writing and display

DISPLAY_COLUMN

error. A display axis that is missing or not a number, date or timestamp.

Name x and y columns of numbers, dates or timestamps.

POINTS_SCHEMA

error. A table that is not a points table: x, y, z Float64 point columns first, then an optional id and Float64 or Int64 attributes.

Make points with table_points.

DISPLAY_TOO_MANY

error. More bars than the point budget, or a budget outside 1 to 1,000,000.

Aggregate before drawing bars, or raise max_points.

CSV_QUOTE

error. A quote inside an unquoted field, or text after a closing quote.

Quote the whole field and double the quotes inside it.

CSV_UNTERMINATED

error. A quoted field runs to the end of the file without a closing quote.

Close the quote, or double a quote meant as text.

CSV_RAGGED

error. A record with a different number of fields from the header.

Give every record the header's field count; an empty field is written as nothing between delimiters.

CSV_UTF8

error. A field that is not valid UTF-8.

Convert the file to UTF-8 before reading it.

CSV_EMPTY

error. The file has no header record.

Add a header, or read with header set to false and a schema.

CSV_HEADER

error. Two columns of the header share a name.

Rename one of them in the file, or read without a header and give a schema.

CSV_TYPE

error. A field that is not a value of its column's type.

Give a schema with a type that holds every value (Utf8 holds anything), or fix the field.

CSV_NULL

error. A null token in a column the schema says is not nullable.

Make the field nullable in the schema, or change the null tokens.

CSV_OPTION

error. The delimiter equals the quote or a line break.

Choose a delimiter that differs from the quote, CR and LF.

CSV_SCHEMA

error. The schema given has a different number of fields from the file's columns.

Give one field per column, in the file's order.

JSONL_NOT_OBJECT

error. A line of JSON lines that is not a JSON object.

Write one object per line; wrap other values in an object with a key.

JSONL_TYPE

error. A JSON value that is not a value of its field's type.

Give a schema whose type holds it (Utf8 holds any value), or fix the value; decimals, dates and times are strings or exact numbers.

JSONL_FIELD

error. A key the schema does not have.

Add the field to the schema, or remove the key.

JSONL_NULL

error. A null or missing key in a field the schema says is not nullable.

Make the field nullable in the schema, or give the value.

IPC_MAGIC

error. Bytes that do not start with hint.ipc/1 or hint.ipc/2.

Read the file with the reader of its format; a hint IPC file is written by ipc::write.

IPC_HASH_MISMATCH

error. A hint IPC file whose bytes do not hash to the hash it ends with: changed, cut short or extended.

Fetch or write the file again; the hash is the value's identity, so a changed file is not that value.

IPC_HEADER

error. A hint.ipc/2 file whose header is not the canonical JSON describes, or whose lengths run past its end.

Write the file again with ipc::write_v2; a header made by hand must follow.

IPC_CODEC

error. A hint.ipc/2 buffer with an unknown codec, or a payload that does not decode to a whole buffer.

Read the file with a hint that knows the codec, or write it again; the codecs are in.

IPC_STATS_MISMATCH

error. A hint.ipc/2 chunk whose statistics in the header are not those of its rows.

Write the file again with ipc::write_v2; statistics a host prunes by must be true.

TABLE_PAGE_OFFSET

error. A page that starts past the table's last row.

Start at a row below the total; the previous page's truncated names the next offset.

The hint language

LANG_TOKEN

error. A character that is not part of the language.

Remove it, or put it inside a string or a backtick-quoted name.

LANG_NUMBER

error. A number followed directly by letters.

Separate the number from the name, or quote the name with backticks.

LANG_STRING

error. A string without its closing quote on the same line, or with an unknown escape.

Close the string; escapes are " \ \n \r \t and \u{…}.

LANG_NAME

error. A backtick-quoted name that is empty or not closed on its line.

Close the name with a backtick.

LANG_BRACKET

error. A bracket that is never closed, closes nothing, or closes another kind.

Close each (, { and [ with its own kind, in order.

LANG_SYNTAX

error. Source that does not follow the grammar of the hint language.

Write what the message says was expected.

SCOPE_UNKNOWN_COLUMN

error. A column name that the input at that verb does not have.

Use one of the nearest names the message lists, or qualify it with its table (t.name).

SCOPE_UNKNOWN_TABLE

error. A from or relation that is neither a host table nor a let binding.

Use one of the nearest names, or bind the pipeline with let first.

SCOPE_AMBIGUOUS

error. An unqualified name that both sides of a join have.

Qualify it with its table or binding: customers.id.

VERB_UNKNOWN

error. A verb the language does not have.

Use one of the nearest verbs the message lists; the language reference lists them all.

LANG_ARGUMENT

error. A verb given the wrong number or kind of positional arguments.

Give the arguments the hint language lists for the verb.

LANG_OPTION

error. An option a verb or sort key does not take, a value it does not accept, or one given twice.

Use one of the nearest options or values the message lists.

LANG_UNNAMED

error. A computed column, measure or window column without a name.

Name it: name = expression.

LANG_NULL_TYPE

error. A null (or an empty or all-null list) with nothing beside it to give it a type.

Write cast(null, to: TYPE).

LANG_TYPE

error. Text in a type position (cast's to:) that is not a type.

Write bool, int64, float64, utf8, binary, date, duration, local_timestamp, timestamp, timestamp("zone"), decimal128(p, s) or list(type).

LANG_LITERAL

error. A literal outside its type's range, a bad @ date or time, or a list literal of mixed or non-literal items.

Fix the literal, or cast a wider one.

LANG_DUPLICATE

error. A let or output name bound twice.

Give each binding and output its own name.

LANG_UNUSED

error. A let binding no pipeline uses.

Use it, or delete it.

LANG_FORMAT

error. A plan part with no source form yet (a struct, map or binary literal, or a name holding a backtick).

Keep the plan as JSON; the hint language cannot print it.

Checks

CONTRACT_SHAPE

error. A contract document whose structure is wrong: a missing or unknown member, a value of the wrong JSON kind, a name declared twice.

Follow hint.contract/1 (hint-check::contract); the message names the nearest allowed member.

CONTRACT_VERSION

error. A contract without "version": "hint.contract/1", or of another version.

Set the version to hint.contract/1.

CONTRACT_METRIC

error. A quality rule naming a metric hint does not have.

Use one of the metrics the message lists (null_count, null_fraction, distinct_count, …).

CONTRACT_OPERATOR

error. A quality rule with no operator or with more than one.

Give exactly one of mustBe, mustNotBe, mustBeGreaterThan, mustBeGreaterOrEqualTo, mustBeLessThan, mustBeLessOrEqualTo, mustBeBetween, mustNotBeBetween.

CONTRACT_VALUE

error. A value a contract member does not accept: an unknown logical type, dimension or severity, a non-number for a count, a bad range or parameter.

Use a value the message lists.

DEDUPE_OPTION

error. A deduplication setting out of range: no fields, a weight that is not positive, a threshold outside 0 to 1.

Give at least one field with a positive weight and a threshold from 0 to 1.

DEDUPE_COLUMN

error. A deduplication field or blocking key naming a column the table lacks, or a table that already has cluster.

Use one of the nearest columns the message lists; rename an existing cluster column.

DEDUPE_TOO_MANY_PAIRS

error. More than 5,000,000 pairs to compare.

Add a blocking key (or a shorter prefix) so that only likely pairs are compared.

Sketches

SKETCH_PARAM

error. A sketch parameter that is unknown, missing or out of range (lg_k, k, width, depth, max_map_size, bits, hashes, size, confidence), or a column the table lacks.

Use the range or the nearest name the message states.

SKETCH_NEEDS_SEED

error. A KLL or reservoir sketch without a seed: their randomness is seeded, never ambient.

Pass seed, an integer ≥ 0.

SKETCH_INCOMPATIBLE

error. Sketches that differ in kind, knob, seed or item type cannot merge.

Merge sketches built with the same parameters over the same item type.

SKETCH_ITEM_TYPE

error. A value of another type than the sketch's items, or a type a sketch cannot hold (Map).

Build the sketch over a column of the type you will query it with.

SKETCH_DECODE

error. Bytes in the hint.value/1 encoding whose sketch header or state is not a valid sketch.

Pass the bytes a sketch's to_bytes gave, unchanged.

SKETCH_OVERFLOW

error. A total weight beyond 2^64 - 1.

Split the data and keep the sketches apart.

Learning

LEAKAGE_TEST_ROWS

error. A fit or a prep that would see rows of a sealed test partition, or a fit downstream of an evaluation report.

Fit on train (or validation) rows; only model_apply and model_evaluate read test.

LEAKAGE_PREP_FOLD

error. A model fitted or evaluated on rows a prep transformed when the prep was fitted on other rows (all rows, or another split).

Fit the prep on the same split's train rows as the model.

LEAKAGE_TIME_ORDER

error. A split that declares a time column but shuffles, a negative gap, or train rows not all earlier than test rows.

Use a time split (or rolling, expanding or purged folds) with a gap ≥ 0.

LEAKAGE_GROUP

error. A split that declares a group column but is not grouped, so one group may lie in two partitions.

Use kind grouped with by set to the group column.

LEAKAGE_DUPLICATE

error. With dedupe: true, a row of one partition equal to a row of another.

Remove the duplicates (table_distinct) before splitting.

SPLIT_PARAM

error. A split parameter that is unknown, missing or out of range, or a column the table lacks.

Use the parameters and ranges the message states.

SPLIT_NEEDS_SEED

error. A random, stratified or grouped split, or a shuffled fold, without a seed.

Pass seed, an integer ≥ 0.

SPLIT_SIZES

error. Fractions that do not sum to 1, a partition that would be empty, or more folds than rows or groups.

Give fractions that sum to 1 and leave every partition at least one row.

SPLIT_TABLE_MISMATCH

error. A split used with another table than the one it was made from.

Make the split from the table you fit or evaluate on.

PREP_PARAM

error. A prep step that is unknown, or whose parameters are missing, unknown or out of range.

Use the steps and parameters of the prep_fit page.

PREP_TYPE

error. A prep step over a column of a type it does not take.

Choose columns of the type the step takes (numbers to scale, text or integers to encode).

PREP_UNSEEN

error. A category the encoder did not see when fitted, with unseen: error.

Fit on rows that include it, or set unseen to ignore or other.

MODEL_PARAM

error. A model family that is unknown, or a parameter that is missing, unknown or out of range.

Use the families and parameters of the model_fit page.

MODEL_FEATURE_TYPE

error. A feature column that is not a number or a boolean.

Encode text columns with prep_fit (one-hot, ordinal, target or hashing) first.

MODEL_NULL_FEATURE

error. A null in a feature column.

Impute with prep_fit first.

MODEL_TARGET

error. A target column that is missing, null in a fitted row, not numeric for a regressor, or with one class for a classifier.

Choose a target of the task's type, with nulls filtered out.

MODEL_SCHEMA_MISMATCH

error. Applying a model or prep to a table without the columns, or the types, it was fitted on.

Apply to a table with the fitted feature schema.

MODEL_SPLIT_MISMATCH

error. Evaluating a model with another split than the one it was fitted on.

Evaluate with the split the model was fitted on.

MODEL_SINGULAR

error. Normal equations that stay singular after the jitter.

Drop collinear features, or use ridge with alpha > 0.

CALIBRATION_ROWS

error. Calibrating a model on the rows it was fitted on, or on no rows.

Calibrate on the split's calibration (or validation) rows.

CALIBRATION_SMALL

warning. Isotonic calibration on fewer than 2,000 rows, which tends to overfit; recorded in the calibration's fit_metrics.

Use method: sigmoid, or a larger calibration partition.

ML_VALUE_DECODE

error. Bytes in the hint.value/1 encoding whose split, prep or model header or state is not valid.

Pass the bytes the value's encoder wrote, unchanged.

The verb runner

TOOL_UNKNOWN

error. A verb name the runner does not dispatch.

Call describe() for the verbs and their parameters.

ARG_INVALID

error. Parameters that do not match the verb's schema (at paramPath).

Give the parameters describe() lists for the verb, of their types and ranges.

VALUE_MISSING

error. A reference the request names but whose bytes it does not carry.

Send the bytes of every sha256: reference in the parameters.

VALUE_REF_MISMATCH

error. Bytes whose SHA-256 is not the reference they were sent under.

Send each value's bytes unchanged, under the ref the engine gave.

VALUE_KIND

error. A reference to a value of another kind than the parameter takes (a model where a table goes).

Pass a value of the kind the parameter names.

REQUEST_MALFORMED

error. ABI bytes that are not a request record (hint.abi/1).

Build the request as the engine's ABI lays out.

RESULT_TRUNCATED

info. A result over its byte budget: lists were cut, or the data left out.

Page with offset / limit, narrow the request, or ask for response_format "detailed".