Skip to content

Commit

Permalink
cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
electron0zero committed Aug 20, 2024
1 parent 7f3728e commit 3ea2d31
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions pkg/traceql/ast_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ func (o *BinaryOperation) execute(span Span) (Static, error) {
// maybe use newBinaryOperation() here to ensure we have a compiled regex.
for _, elem := range elements {
elemOp.LHS = elem
// FIXME: can we make do without the nested execute in a loop??
res, err = elemOp.execute(span)
if err != nil {
break // get out early in case of errors
Expand All @@ -456,8 +455,7 @@ func (o *BinaryOperation) execute(span Span) (Static, error) {
if rhsT.isMatchingArrayElement(lhsT) {
// for regex operations, we assume that RHS is the regex, and compile it.
// we can support symmetric array operations by flipping the sides and executing the binary operation.
// FIXME: flipping the ops will mess up >, >=, <, <= operations so flip these operations as well.
// if we flip sides for OpGreater, OpGreaterEqual, OpLess, OpLessEqual. we will
// for >, >=, <, <= we need to flip the op as well, otherwise flipping sides will change the query.
flippedOp := o.Op
switch o.Op {
case OpGreater:
Expand Down
1 change: 0 additions & 1 deletion pkg/traceql/ast_execute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,6 @@ func TestSpansetOperationEvaluateArrayUnsupported(t *testing.T) {
require.Error(t, err, errors.ErrUnsupported)
})
}

}

func TestScalarFilterEvaluate(t *testing.T) {
Expand Down

0 comments on commit 3ea2d31

Please sign in to comment.