// If left or right is a BoolQuery built from AndExpr then reuse it w/o creating new BoolQuery.
_, isLEAnd := leftExpr.(*sqlparser.AndExpr)
if isLQBool && isLEAnd {
return lqBool.Filter(rightQuery), nil
}
_, isREAnd := rightExpr.(*sqlparser.AndExpr)
if isRQBool && isREAnd {
return rqBool.Filter(leftQuery), nil
}
}