@Test public void testToJson() { FunctionDesc desc = new FunctionDesc("sum", TestSum.class, FunctionType.GENERAL, CatalogUtil.newSimpleDataType(Type.INT4), CatalogUtil.newSimpleDataTypeArray(Type.INT4, Type.INT8)); String json = desc.toJson(); FunctionDesc fromJson = CatalogGsonHelper.fromJson(json, FunctionDesc.class); assertEquals(desc, fromJson); assertEquals(desc.getProto(), fromJson.getProto()); }
public String toJson() { return CatalogGsonHelper.toJson(this, FunctionDesc.class); }
FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> { public String toJson() { return CatalogGsonHelper.toJson(this, FunctionDesc.class); } }
FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> { public String toJson() { return CatalogGsonHelper.toJson(this, FunctionDesc.class); } FunctionDesc();  FunctionDesc(String funcName, Class<? extends Function> clazz,
      FunctionType funcType, DataType retType, @NotNull DataType [] params);  FunctionDesc(FunctionDescProto proto);  FunctionDesc(String signature, String className, FunctionType type,
                      DataType retType,
                      @NotNull DataType... argTypes);  FunctionDesc(FunctionSignature signature, FunctionInvocation invocation, FunctionSupplement supplement); }
FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> { public String toJson() { return CatalogGsonHelper.toJson(this, FunctionDesc.class); } FunctionDesc();  FunctionDesc(String funcName, Class<? extends Function> clazz,
      FunctionType funcType, DataType retType, @NotNull DataType [] params);  FunctionDesc(FunctionDescProto proto);  FunctionDesc(String signature, String className, FunctionType type,
                      DataType retType,
                      @NotNull DataType... argTypes);  FunctionDesc(FunctionSignature signature, FunctionInvocation invocation, FunctionSupplement supplement); FunctionSignature getSignature(); FunctionInvocation getInvocation(); FunctionSupplement getSupplement(); Function newInstance(); FunctionType getFuncType(); String getFunctionName(); DataType [] getParamTypes(); DataType getReturnType(); boolean isDeterministic(); @SuppressWarnings("unchecked") Class<? extends Function> getLegacyFuncClass(); String getDescription(); String getDetail(); String getExample(); void setDescription(String description); void setDetail(String detail); void setExample(String example); @Override int hashCode(); int hashCodeWithoutType(); @Override boolean equals(Object obj); boolean equalsSignature(Object obj); @Override Object clone(); @Override FunctionDescProto getProto(); @Override String toString(); String toJson(); String getHelpSignature(); @Override int compareTo(FunctionDesc o); }
FunctionDesc implements ProtoObject<FunctionDescProto>, Cloneable, GsonObject, Comparable<FunctionDesc> { public String toJson() { return CatalogGsonHelper.toJson(this, FunctionDesc.class); } FunctionDesc();  FunctionDesc(String funcName, Class<? extends Function> clazz,
      FunctionType funcType, DataType retType, @NotNull DataType [] params);  FunctionDesc(FunctionDescProto proto);  FunctionDesc(String signature, String className, FunctionType type,
                      DataType retType,
                      @NotNull DataType... argTypes);  FunctionDesc(FunctionSignature signature, FunctionInvocation invocation, FunctionSupplement supplement); FunctionSignature getSignature(); FunctionInvocation getInvocation(); FunctionSupplement getSupplement(); Function newInstance(); FunctionType getFuncType(); String getFunctionName(); DataType [] getParamTypes(); DataType getReturnType(); boolean isDeterministic(); @SuppressWarnings("unchecked") Class<? extends Function> getLegacyFuncClass(); String getDescription(); String getDetail(); String getExample(); void setDescription(String description); void setDetail(String detail); void setExample(String example); @Override int hashCode(); int hashCodeWithoutType(); @Override boolean equals(Object obj); boolean equalsSignature(Object obj); @Override Object clone(); @Override FunctionDescProto getProto(); @Override String toString(); String toJson(); String getHelpSignature(); @Override int compareTo(FunctionDesc o);  }