ExprForSpan constructs a leaf-level SpanExpression for an inverted expression. Note that these leaf-level expressions may also have tight = false. Geospatial functions are all non-tight. For JSON, expressions like x <@ '{"a":1, "b":2}'::json will have tight = false. Say SpanA, SpanB correspond to "
(span Span, tight bool)
| 517 | // be very wide when SpanA and SpanB are narrow, or vice versa, |
| 518 | // this tight expression would be very costly to evaluate. |
| 519 | func ExprForSpan(span Span, tight bool) *SpanExpression { |
| 520 | return &SpanExpression{ |
| 521 | Tight: tight, |
| 522 | SpansToRead: []Span{span}, |
| 523 | FactoredUnionSpans: []Span{span}, |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | // ContainsKeys traverses the SpanExpression to determine whether the span |
| 528 | // expression contains the given keys. It is primarily used for testing. |
no outgoing calls
no test coverage detected
searching dependent graphs…