public static String sargToKryo(SearchArgument sarg) {
    try (Output out = new Output(KRYO_OUTPUT_BUFFER_SIZE, KRYO_OUTPUT_BUFFER_MAX_SIZE)) {
      Kryo kryo = SerializationUtilities.borrowKryo();
      kryo.writeObject(out, sarg);
      SerializationUtilities.releaseKryo(kryo);
      return Base64.encodeBase64String(out.toBytes());
    }
  }
Do the recursive parse of the Hive ExprNodeDesc into our ExpressionTree.
@param expression the Hive ExprNodeDesc
ql/src/java/org/apache/hadoop/hive/ql/io/sarg/ConvertAstToSearchArg.java