jaegertracing/jaeger · error

unknown column for position: %q

Error message

unknown column for position: %q

What it means

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.

Source

Thrown at internal/storage/v1/cassandra/dependencystore/model.go:33

	Parent    string `cql:"parent"`
	Child     string `cql:"child"`
	CallCount int64  `cql:"call_count"` // always unsigned, but we cannot explicitly read uint64 from Cassandra
	Source    string `cql:"source"`
}

// MarshalUDT handles marshalling a Dependency.
func (d *Dependency) MarshalUDT(name string, info gocql.TypeInfo) ([]byte, error) {
	switch name {
	case "parent":
		return gocql.Marshal(info, d.Parent)
	case "child":
		return gocql.Marshal(info, d.Child)
	case "call_count":
		return gocql.Marshal(info, d.CallCount)
	case "source":
		return gocql.Marshal(info, d.Source)
	default:
		return nil, fmt.Errorf("unknown column for position: %q", name)
	}
}

// UnmarshalUDT handles unmarshalling a Dependency.
func (d *Dependency) UnmarshalUDT(name string, info gocql.TypeInfo, data []byte) error {
	switch name {
	case "parent":
		return gocql.Unmarshal(info, data, &d.Parent)
	case "child":
		return gocql.Unmarshal(info, data, &d.Child)
	case "call_count":
		return gocql.Unmarshal(info, data, &d.CallCount)
	case "source":
		return gocql.Unmarshal(info, data, &d.Source)
	default:
		return fmt.Errorf("unknown column for position: %q", name)
	}
}

View on GitHub (pinned to 806f444784)

Solutions

  1. Compare the UDT column names in Cassandra (DESCRIBE the UDT) with the switch cases in model.go and align them.
  2. Apply the official Jaeger Cassandra schema for your Jaeger version (schema keyspace scripts).
  3. Upgrade or downgrade Jaeger to match the deployed schema version (v1 vs v2 schema).
  4. Drop and recreate the dependency UDT from the canonical schema if it was hand-edited.
Defensive patterns

Strategy: validation

Validate before calling

// before writing, verify the UDT schema matches expectations
var cols []string
iter := session.Query(`SELECT column_name FROM system_schema.columns WHERE keyspace_name=? AND table_name='dependency_links'`, keyspace).Iter()
for cols = []string{}; iter.Scan(&col); { cols = append(cols, col) }

Try / catch

if err := WriteDependencies(ctx, ts, deps); err != nil {
    var unknownCol = "unknown column for position"
    if strings.Contains(err.Error(), unknownCol) { /* schema drift: run schema migration */ }
    return err
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01). Data as JSON: /api/errors/fb96564d59511f48. Report an issue: GitHub.