{"record":{"id":"b05db5065e24473d","repo":"cube-js/cube","slug":"unexpected-type-for-sequence-column","errorCode":null,"errorMessage":"Unexpected type for sequence column: {:?}","messagePattern":"Unexpected type for sequence column: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/streaming/mod.rs","lineNumber":344,"sourceCode":"            app_metrics::STREAMING_ROUNDTRIP_ROWS.report_with_tags(rows.len() as i64, Some(&tags));\n            for row in rows {\n                let row = row?;\n                append_row(&mut builders, table_cols, &row);\n                match &row.values()[seq_column_index] {\n                    TableValue::Int(new_last_seq) => {\n                        if let Some(start_seq) = &mut start_seq {\n                            *start_seq = (*start_seq).min(*new_last_seq);\n                        } else {\n                            start_seq = Some(*new_last_seq);\n                        }\n\n                        if let Some(end_seq) = &mut end_seq {\n                            *end_seq = (*end_seq).max(*new_last_seq);\n                        } else {\n                            end_seq = Some(*new_last_seq);\n                        }\n                    }\n                    x => panic!(\"Unexpected type for sequence column: {:?}\", x),\n                }\n            }\n            let seq_pointer = SeqPointer::new(start_seq, end_seq);\n            let replay_handle = self\n                .meta_store\n                .create_replay_handle(table.get_id(), location_index, seq_pointer)\n                .await?;\n            let data = finish(builders);\n            let data = source.apply_post_processing(data).await?;\n\n            let partition_started_at = SystemTime::now();\n            let new_chunks = self\n                .chunk_store\n                .partition_data(\n                    table.get_id(),\n                    data,\n                    table.get_row().get_columns().as_slice(),\n                    true,","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/streaming/mod.rs#L326-L362","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Check for version mismatch between writer and reader CubeStore instances and align versions","Re-ingest the affected table data from the source","Inspect the sequence column type in the affected location and file a bug if data was produced normally"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"// panic aborts the process; supervise, then re-ingest the affected table on this failure mode\nif crash log matches 'Unexpected type for sequence column': restart cubestored, mark the affected location bad, re-ingest the table from source.","preventionTips":["Keep streaming writer/reader versions compatible","Never manually edit streamed data files or sequence columns","Validate data files after restores from backup","Report panics during normal replay to maintainers with version info"],"tags":["panic","streaming","type-mismatch","sequence"],"backgroundTag":"schema-type-mismatch","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}