MCPcopy
hub / github.com/grafana/tempo / createDurationPredicate

Function createDurationPredicate

tempodb/encoding/vparquet3/block_traceql.go:2172–2183  ·  view source on GitHub ↗
(op traceql.Operator, operands traceql.Operands)

Source from the content-addressed store, hash-verified

2170}
2171
2172func createDurationPredicate(op traceql.Operator, operands traceql.Operands) (parquetquery.Predicate, error) {
2173 if pred, handled := createExistencePredicate(op); handled {
2174 return pred, nil
2175 }
2176
2177 if len(operands) > 0 && (operands[0].Type == traceql.TypeFloat || operands[0].Type == traceql.TypeFloatArray) {
2178 // The column is already indexed as int, so we need to convert the float to int
2179 return createIntPredicateFromFloat(op, operands)
2180 }
2181
2182 return createIntPredicate(op, operands)
2183}
2184
2185// createIntPredicateFromFloat adapts a float-based query operand to an int column.
2186// If the float is exactly representable as an int64 (e.g. 42.0), we compare the

Callers 3

createSpanIteratorFunction · 0.70
createTraceIteratorFunction · 0.70

Calls 3

createExistencePredicateFunction · 0.70
createIntPredicateFunction · 0.70

Tested by 1