DomGarguilo commented on code in PR #77:
URL: https://github.com/apache/accumulo-access/pull/77#discussion_r1669129618
##########
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
Review Comment:
```suggestion
* the expression. Normalization is an optional process that the user can
choose to apply when
```
##########
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
Review Comment:
```suggestion
* <p>
* Normalization removes duplicates, sorts, flattens, and removes unneeded
parentheses or quotes in
```
##########
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:
Although it can be inferred, it might make things clearer to explicitly say
why a user may not want to normalize. Is it because normalization may rearrange
the expression which could disrupt an intention short-circuit?
--
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]