private Supplier<String> getSessionId() {
    Supplier<String> sessionId = () -> {
      if (sessHandle == null) {
        return "NO_SESSION";
      }
      StringBuilder b = new StringBuilder();
      TBaseHelper.toString(sessHandle.getSessionId().bufferForGuid(), b);
      return b.toString().replaceAll("\\s", "");
    };
    return sessionId;
  }
Creates a sessionId Supplier for interceptors. When interceptors are instantiated,
there is no session yet (sessHandle is null) so this Supplier can take care
of the sessionId in a lazy way.
jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java