{"record":{"id":"2d72c3f6fa93e1b2","repo":"jaegertracing/jaeger","slug":"unknown-column-for-position-q-2d72c3","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/spanstore/dbmodel/cql_udt.go","lineNumber":49,"sourceCode":"// MarshalUDT handles marshalling a Tag.\nfunc (t *KeyValue) MarshalUDT(name string, info gocql.TypeInfo) ([]byte, error) {\n\tswitch name {\n\tcase \"key\":\n\t\treturn gocql.Marshal(info, t.Key)\n\tcase \"value_type\":\n\t\treturn gocql.Marshal(info, t.ValueType)\n\tcase \"value_string\":\n\t\treturn gocql.Marshal(info, t.ValueString)\n\tcase \"value_bool\":\n\t\treturn gocql.Marshal(info, t.ValueBool)\n\tcase \"value_long\":\n\t\treturn gocql.Marshal(info, t.ValueInt64)\n\tcase \"value_double\":\n\t\treturn gocql.Marshal(info, t.ValueFloat64)\n\tcase \"value_binary\":\n\t\treturn gocql.Marshal(info, t.ValueBinary)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown column for position: %q\", name)\n\t}\n}\n\n// UnmarshalUDT handles unmarshalling a Tag.\nfunc (t *KeyValue) UnmarshalUDT(name string, info gocql.TypeInfo, data []byte) error {\n\tswitch name {\n\tcase \"key\":\n\t\treturn gocql.Unmarshal(info, data, &t.Key)\n\tcase \"value_type\":\n\t\treturn gocql.Unmarshal(info, data, &t.ValueType)\n\tcase \"value_string\":\n\t\treturn gocql.Unmarshal(info, data, &t.ValueString)\n\tcase \"value_bool\":\n\t\treturn gocql.Unmarshal(info, data, &t.ValueBool)\n\tcase \"value_long\":\n\t\treturn gocql.Unmarshal(info, data, &t.ValueInt64)\n\tcase \"value_double\":\n\t\treturn gocql.Unmarshal(info, data, &t.ValueFloat64)","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v1/cassandra/spanstore/dbmodel/cql_udt.go#L31-L67","documentation":"KeyValue.MarshalUDT implements gocql's UDTMarshaller; Cassandra sends the UDT field names for the tag UDT and each must match a known column (tag_key, tag_type, value_string, value_bool, value_int64, value_double, value_binary). Any other name means the Cassandra-side UDT schema drifted from this Go struct. This is a schema-contract mismatch, not a data problem.","triggerScenarios":"Writing spans when the tags UDT in Cassandra contains a column not present in the dbmodel.KeyValue switch — e.g. a manually added column, a UDT created by a different Jaeger/schema version, or a typo'd column name in cqlsh DDL.","commonSituations":"Running a newer Jaeger against an old schema (or vice versa); custom ALTER TYPE additions to the UDT; restoring data into a keyspace whose UDTs were re-created with different field names.","solutions":["Compare the tags UDT definition (DESCRIBE keyspace / system_schema.usertypes) against the case names in cql_udt.go and re-apply the canonical Jaeger schema (migrations from plugin/storage/cassandra).","Remove or rename any custom/stray columns added to the UDT; Cassandra UDTs cannot DROP fields, so recreate the UDT/table if drifted.","Ensure the Jaeger binary and the schema version were provisioned from the same release."],"exampleFix":"// before (cqlsh, drifted UDT)\nALTER TYPE tags ADD extra_field text;\n// after\n-- recreate UDT with exactly the fields dbmodel.KeyValue marshals:\n-- tag_key, tag_type, value_string, value_bool, value_int64, value_double, value_binary\nCREATE TYPE tags (...);","handlingStrategy":"validation","validationCode":"// Run before deploying: compare UDT fields in Cassandra with expected ones\nSELECT keyspace_name, type_name, field_names\nFROM system_schema.usertypes\nWHERE type_name IN ('tag','log','span_ref','process');\n// tag must be exactly: tag_key, tag_type, value_string, value_bool, value_int64, value_double, value_binary","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Apply schema only through official Jaeger migrations, never ad-hoc ALTER TYPE.","Validate UDT definitions against expected field names in CI after schema changes.","Keep Jaeger binary and schema versions in lockstep.","Avoid sharing one keyspace across different Jaeger versions."],"tags":["cassandra","udt","schema-mismatch","gocql"],"backgroundTag":"udt-schema-mismatch","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}