keith-turner opened a new pull request, #83: URL: https://github.com/apache/accumulo-access/pull/83
Added the ability to create immutable parse trees from an access expression. These parse trees are similar to the deprecated mutable parse trees in ColumnVisibility. One conceptual difference is they expose the sub expression at each level of the tree instead of only doing this at the leaves. This allows each node in the tree to be treated as an access expression which is why the type extends access expression. The normalization code that was baked into AccessExpression was removed and a new example was made that does the same thing. This was done because in previous conversations on pull request it was pointed out that normalization could be done in many different ways. The normalization algorithm in the example is much cleaner than the internal algorithm that was removed which came from ColumnVisibility. The old algorithm used to go down the parse tree and on the way back up it would compare nodes and this comparison went back down the parse tree. The new example algorithm avoids going back down the parse tree when comparing. When making the new ParsedAccessExpression type immutable realized that the existing AccessExpression was not really immutable. Converted it from an interface to abstract class in attempt to actually make the type immutable. These changes also supported the introduction of the new type for the parse tree. While working on the examples realized that users would need the ability to unquote authorizations when working w/ parse trees. Added a static method to support this. Moved the existing functionality to get authorizations for an access expression from an instance method to a static method. Also reworked to take a consumer instead of returning a set, making it possible to avoid the set creation for uses cases that do not need it. This change was made to position this existing functionality in a more sensible way with the new parse tree functionality. Did not do in a follow on because it would have required implementing functionality that would be removed. Follow on work that could be done is making expression evaluation use the parse tree if its present. -- 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]
