keith-turner commented on PR #31:
URL: https://github.com/apache/accumulo-access/pull/31#issuecomment-1785472871
Accumulo uses column visibility in the following way.
* On the client side for insertion a ColumnVisibility object must be
created. Evaluation will never be done with this object.
* On the server side an iterator will parse and evaluate column visibility
byte arrays all at once.
So these changes are ideal for the Accumulo server side code. For Accumulo
client side code, it may be useful to offer the ability to validate an
expression w/o parsing. So maybe the direction this PR could take is the
following.
1. Offer functionality to parse and evaluate string or byte[] access
expressions all at once w/o any object allocation.
2. Offer functionality to validate a string or byte[] access expressions
w/o any object allocation.
3. Offer functionality to compile an access expression.
This PR currently implements 1 above. For 2 above that could be implemented
in this PR and could be used in the client side Accumulo code to make
insertions faster. For 3 above, this library already offers but it could be
presented in a different way.
```java
// static method to validate an access expression w/o creating a parse tree,
thows an exception if its not valid
AccessExpression.validate("A|B")
// change the existing static methods named of to compile
vat compiledAccessExpression = AccessExpression.compile("A|B);
```
--
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]