{"record":{"id":"fb96564d59511f48","repo":"jaegertracing/jaeger","slug":"unknown-column-for-position-q","errorCode":null,"errorMessage":"unknown column for position: %q","messagePattern":"unknown column for position: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v1/cassandra/dependencystore/model.go","lineNumber":33,"sourceCode":"\tParent    string `cql:\"parent\"`\n\tChild     string `cql:\"child\"`\n\tCallCount int64  `cql:\"call_count\"` // always unsigned, but we cannot explicitly read uint64 from Cassandra\n\tSource    string `cql:\"source\"`\n}\n\n// MarshalUDT handles marshalling a Dependency.\nfunc (d *Dependency) MarshalUDT(name string, info gocql.TypeInfo) ([]byte, error) {\n\tswitch name {\n\tcase \"parent\":\n\t\treturn gocql.Marshal(info, d.Parent)\n\tcase \"child\":\n\t\treturn gocql.Marshal(info, d.Child)\n\tcase \"call_count\":\n\t\treturn gocql.Marshal(info, d.CallCount)\n\tcase \"source\":\n\t\treturn gocql.Marshal(info, d.Source)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown column for position: %q\", name)\n\t}\n}\n\n// UnmarshalUDT handles unmarshalling a Dependency.\nfunc (d *Dependency) UnmarshalUDT(name string, info gocql.TypeInfo, data []byte) error {\n\tswitch name {\n\tcase \"parent\":\n\t\treturn gocql.Unmarshal(info, data, &d.Parent)\n\tcase \"child\":\n\t\treturn gocql.Unmarshal(info, data, &d.Child)\n\tcase \"call_count\":\n\t\treturn gocql.Unmarshal(info, data, &d.CallCount)\n\tcase \"source\":\n\t\treturn gocql.Unmarshal(info, data, &d.Source)\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown column for position: %q\", name)\n\t}\n}","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v1/cassandra/dependencystore/model.go#L15-L51","documentation":"Dependency implements gocql.UDTMarshaler for the dependency_links UDT. MarshalUDT is called by gocql for each column name in the UDT; if Cassandra's schema contains a column the struct does not know (mismatch between the Go struct and the Cassandra UDT definition), it returns this error.","triggerScenarios":"Writing dependencies (WriteDependencies -> gocql marshal of the Dependency UDT) when the Cassandra UDT schema has a column name other than ts/child/call_count/source (e.g. a schema drifted or extended with a new column).","commonSituations":"Applying a schema migration that adds/renames UDT columns without updating the Jaeger version, or pointing Jaeger at a keyspace with a modified dependency UDT.","solutions":["Compare the UDT column names in Cassandra (DESCRIBE the UDT) with the switch cases in model.go and align them.","Apply the official Jaeger Cassandra schema for your Jaeger version (schema keyspace scripts).","Upgrade or downgrade Jaeger to match the deployed schema version (v1 vs v2 schema).","Drop and recreate the dependency UDT from the canonical schema if it was hand-edited."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before writing, verify the UDT schema matches expectations\nvar cols []string\niter := session.Query(`SELECT column_name FROM system_schema.columns WHERE keyspace_name=? AND table_name='dependency_links'`, keyspace).Iter()\nfor cols = []string{}; iter.Scan(&col); { cols = append(cols, col) }","typeGuard":null,"tryCatchPattern":"if err := WriteDependencies(ctx, ts, deps); err != nil {\n    var unknownCol = \"unknown column for position\"\n    if strings.Contains(err.Error(), unknownCol) { /* schema drift: run schema migration */ }\n    return err\n}","preventionTips":["Apply Jaeger's official schema .cql files; never hand-edit UDTs.","Pin Jaeger and schema versions together in deployment.","Add a startup schema check comparing UDT columns with the supported set."],"tags":["cassandra","storage","schema","serialization"],"backgroundTag":"schema-mismatch","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}