Hi All, Starting in version 3.6, the ternary boolean system was introduced to handle comparison/equality tests within Gremlin. Recently, I've been implementing some list functions from Proposal 3 which make heavy use of the GremlinValueComparator to determine if values satisfy a specific condition. However, I'm finding it a bit tricky to understand how I should handle the GremlinTypeErrorException. For any() and all(), it seems like it would make sense to immediately reduce any ERROR state to false as it's a filter step. In the case of all(), if a GremlinTypeErrorException is caught, it would mean there was a comparison error so the traverser should be removed from the stream. However, doing this seemingly clashes with the original intention of ternary boolean which is to allow a provider-specific response on how to handle an ERROR state.
My current thoughts are that we should rework the ternary boolean system in the future to make it easier to incorporate it into new steps. One of the trickiest parts is that it uses unchecked exceptions as a means to implement the ERROR state which can get easily missed or accidentally leaked to the user (which has happened before). For now, I'm planning to go ahead and immediately reduce ERROR states as I think that is what makes the most sense for list functions. Does anyone have any thoughts about this? Thanks, Ken
