Hey Pinot team, My name is Charlie Summers and I'm a new contributor to the project. As I've started diving into the code, I'm not seeing a consistent pattern for how we handle unexpected behavior in the project.
In some places we're throwing exceptions. In some places we log an error message then continue, returning a Null if a value is expected and having calling code handle the Null. When handling Nulls, we sometimes use @Nullable and @NotNull annotations and sometimes use Preconditions.checkNotNull(). I was chatting a bit with Kishore about this in Slack - he didn't have a strong preference for how to handle these things but was concerned about the performance implications of over-using Annotations and Precondition checks. What are all of your feelings on the matter? Personally I'm a fan of throwing Exceptions should state truly be exceptional instead of limping on and then handling a Null later. Where there's a need for a partially-functioning state or values may genuinely not be present, I'm a fan of Optionals (about their performance: https://stackoverflow.com/questions/34696884/performance-of-java-optional/34697019 ). What have you all found to be effective? And definitely let me know if there is a more consistent standard that I'm missing because I've only just started dabbling with the code base. Cheers, Charlie Summers