| 2170 | } |
| 2171 | |
| 2172 | func 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 |