dlmarion commented on code in PR #77: URL: https://github.com/apache/accumulo-access/pull/77#discussion_r1669141156
########## src/main/java/org/apache/accumulo/access/AccessExpression.java: ########## @@ -26,6 +26,13 @@ * expressions as arguments in code, consider using this type instead of a String. The advantage of * passing this type over a String is that its known to be a valid expression. * + * Normalization removes duplicates, sorts, flattens, and removes unneeded parentheses or quotes in + * the expression. Normalization is an optional process that the user can choose to occur when + * constructing an AccessExpression. The AccessEvaluator has the ability to short-circuit + * evaluation, for example when the left hand side of an OR expression is valid, then it won't need + * to evaluate the right side. The user may not want to perform normalization if they are + * constructing their AccessExpressions to take advantage of this feature. Review Comment: Yes, that's the implication. You can see it in the tests. https://github.com/apache/accumulo-access/blob/main/src/test/java/org/apache/accumulo/access/AccessExpressionTest.java#L103 is a good example where the tokens get re-ordered. If the OR short-circuting is occurring (my question above), then I think the user would want to craft the AccessExpression such that the tokens that have a higher probability of being seen occur first in the expression. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
