cube-js/cube · error

Unexpected type for sequence column: {:?}

Error message

Unexpected type for sequence column: {:?}

What it means

While streaming (replaying) table data, the code tracks a sequence column to build a SeqPointer (start/end sequence). If the column holding sequence information has an unexpected type variant instead of the expected numeric sequence representation, the match falls to a panic describing the unexpected type.

Source

Thrown at rust/cubestore/cubestore/src/streaming/mod.rs:344

            app_metrics::STREAMING_ROUNDTRIP_ROWS.report_with_tags(rows.len() as i64, Some(&tags));
            for row in rows {
                let row = row?;
                append_row(&mut builders, table_cols, &row);
                match &row.values()[seq_column_index] {
                    TableValue::Int(new_last_seq) => {
                        if let Some(start_seq) = &mut start_seq {
                            *start_seq = (*start_seq).min(*new_last_seq);
                        } else {
                            start_seq = Some(*new_last_seq);
                        }

                        if let Some(end_seq) = &mut end_seq {
                            *end_seq = (*end_seq).max(*new_last_seq);
                        } else {
                            end_seq = Some(*new_last_seq);
                        }
                    }
                    x => panic!("Unexpected type for sequence column: {:?}", x),
                }
            }
            let seq_pointer = SeqPointer::new(start_seq, end_seq);
            let replay_handle = self
                .meta_store
                .create_replay_handle(table.get_id(), location_index, seq_pointer)
                .await?;
            let data = finish(builders);
            let data = source.apply_post_processing(data).await?;

            let partition_started_at = SystemTime::now();
            let new_chunks = self
                .chunk_store
                .partition_data(
                    table.get_id(),
                    data,
                    table.get_row().get_columns().as_slice(),
                    true,

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Check for version mismatch between writer and reader CubeStore instances and align versions
  2. Re-ingest the affected table data from the source
  3. Inspect the sequence column type in the affected location and file a bug if data was produced normally
Defensive patterns

Strategy: validation

Try / catch

// panic aborts the process; supervise, then re-ingest the affected table on this failure mode
if crash log matches 'Unexpected type for sequence column': restart cubestored, mark the affected location bad, re-ingest the table from source.

Prevention

When it happens

Trigger: stream_table replaying a location whose sequence column values are not of the expected type (e.g. a string or unexpected enum variant where a numeric sequence value is required).

Common situations: Corrupted or hand-edited streaming data files, ingesting data written by an incompatible CubeStore version, or a bug in how the sequence column was produced.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/b05db5065e24473d. Report an issue: GitHub.