{"modulePath":"github.com/matrixorigin/matrixone","version":"v1.1.3","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package functionAgg\n\n## Variables\n\n```go\nvar (\n\t// any_value() supported input type and output type.\n\tAggAnyValueSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_date, types.T_datetime,\n\t\ttypes.T_timestamp, types.T_time,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t\ttypes.T_bool,\n\t\ttypes.T_varchar, types.T_char, types.T_blob, types.T_text,\n\t\ttypes.T_uuid,\n\t\ttypes.T_binary, types.T_varbinary,\n\t\ttypes.T_Rowid,\n\t}\n\tAggAnyValueReturnType = func(typs []types.Type) types.Type {\n\t\treturn typs[0]\n\t}\n)\n```\n\n```go\nvar (\n\tAggAvgSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t}\n\tAggAvgReturnType = func(typs []types.Type) types.Type {\n\t\tswitch typs[0].Oid {\n\t\tcase types.T_decimal64:\n\t\t\ts := int32(12)\n\t\t\tif s \u003c typs[0].Scale {\n\t\t\t\ts = typs[0].Scale\n\t\t\t}\n\t\t\tif s \u003e typs[0].Scale+6 {\n\t\t\t\ts = typs[0].Scale + 6\n\t\t\t}\n\t\t\treturn types.New(types.T_decimal128, 18, s)\n\t\tcase types.T_decimal128:\n\t\t\ts := int32(12)\n\t\t\tif s \u003c typs[0].Scale {\n\t\t\t\ts = typs[0].Scale\n\t\t\t}\n\t\t\tif s \u003e typs[0].Scale+6 {\n\t\t\t\ts = typs[0].Scale + 6\n\t\t\t}\n\t\t\treturn types.New(types.T_decimal128, 18, s)\n\t\tcase types.T_float32, types.T_float64:\n\t\t\treturn types.New(types.T_float64, 0, 0)\n\t\tcase types.T_int8, types.T_int16, types.T_int32, types.T_int64:\n\t\t\treturn types.New(types.T_float64, 0, 0)\n\t\tcase types.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64:\n\t\t\treturn types.New(types.T_float64, 0, 0)\n\t\t}\n\t\tpanic(moerr.NewInternalErrorNoCtx(\"unsupported type '%v' for avg\", typs[0]))\n\t}\n)\n```\n\n```go\nvar (\n\t// bit_and() supported input type and output type.\n\tAggBitAndSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_binary, types.T_varbinary,\n\t}\n\tAggBitAndReturnType = func(typs []types.Type) types.Type {\n\t\tif typs[0].Oid == types.T_binary || typs[0].Oid == types.T_varbinary {\n\t\t\treturn typs[0]\n\t\t}\n\t\treturn types.New(types.T_uint64, 0, 0)\n\t}\n)\n```\n\n```go\nvar (\n\t// bit_or() supported input type and output type.\n\tAggBitOrSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_binary, types.T_varbinary,\n\t}\n\tAggBitOrReturnType = AggBitAndReturnType\n)\n```\n\n```go\nvar (\n\t// bit_xor() supported input type and output type.\n\tAggBitXorSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_binary, types.T_varbinary,\n\t}\n\tAggBitXorReturnType = AggBitAndReturnType\n)\n```\n\n```go\nvar (\n\tAggClusterCentersSupportedParameters = []types.T{\n\t\ttypes.T_array_float32, types.T_array_float64,\n\t}\n\n\tAggClusterCentersReturnType = func(typs []types.Type) types.Type {\n\t\treturn types.T_varchar.ToType()\n\t}\n)\n```\n\n```go\nvar (\n\tAggMaxSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_date, types.T_datetime,\n\t\ttypes.T_timestamp, types.T_time,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t\ttypes.T_bool,\n\t\ttypes.T_varchar, types.T_char, types.T_blob, types.T_text,\n\t\ttypes.T_uuid,\n\t\ttypes.T_binary, types.T_varbinary,\n\t}\n\tAggMaxReturnType = func(typs []types.Type) types.Type {\n\t\treturn typs[0]\n\t}\n)\n```\n\n```go\nvar (\n\t// median() supported input type and output type.\n\tAggMedianSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t}\n\tAggMedianReturnType = func(typs []types.Type) types.Type {\n\t\tswitch typs[0].Oid {\n\t\tcase types.T_decimal64:\n\t\t\treturn types.New(types.T_decimal128, 38, typs[0].Scale+1)\n\t\tcase types.T_decimal128:\n\t\t\treturn types.New(types.T_decimal128, 38, typs[0].Scale+1)\n\t\tcase types.T_float32, types.T_float64:\n\t\t\treturn types.New(types.T_float64, 0, 0)\n\t\tcase types.T_int8, types.T_int16, types.T_int32, types.T_int64:\n\t\t\treturn types.New(types.T_float64, 0, 0)\n\t\tcase types.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64:\n\t\t\treturn types.New(types.T_float64, 0, 0)\n\t\t}\n\t\tpanic(moerr.NewInternalErrorNoCtx(\"unsupported type '%v' for median\", typs[0]))\n\t}\n)\n```\n\n```go\nvar (\n\tAggMinSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_date, types.T_datetime,\n\t\ttypes.T_timestamp, types.T_time,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t\ttypes.T_bool,\n\t\ttypes.T_varchar, types.T_char, types.T_blob, types.T_text,\n\t\ttypes.T_uuid,\n\t\ttypes.T_binary, types.T_varbinary,\n\t}\n\tAggMinxReturnType = func(typs []types.Type) types.Type {\n\t\treturn typs[0]\n\t}\n)\n```\n\n```go\nvar (\n\t// stddev_pop() supported input type and output type.\n\tAggStdDevSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t}\n\tAggStdDevReturnType = AggVarianceReturnType\n)\n```\n\n```go\nvar (\n\tAggSumSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t}\n\tAggSumReturnType = func(typs []types.Type) types.Type {\n\t\tswitch typs[0].Oid {\n\t\tcase types.T_float32, types.T_float64:\n\t\t\treturn types.T_float64.ToType()\n\t\tcase types.T_int8, types.T_int16, types.T_int32, types.T_int64:\n\t\t\treturn types.T_int64.ToType()\n\t\tcase types.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64:\n\t\t\treturn types.T_uint64.ToType()\n\t\tcase types.T_decimal64:\n\t\t\treturn types.New(types.T_decimal64, 18, typs[0].Scale)\n\t\tcase types.T_decimal128:\n\t\t\treturn types.New(types.T_decimal128, 38, typs[0].Scale)\n\t\t}\n\t\tpanic(moerr.NewInternalErrorNoCtx(\"unsupported type '%v' for sum\", typs[0]))\n\t}\n)\n```\n\n```go\nvar (\n\tErrInvalidLengthTypes        = fmt.Errorf(\"proto: negative length found during unmarshaling\")\n\tErrIntOverflowTypes          = fmt.Errorf(\"proto: integer overflow\")\n\tErrUnexpectedEndOfGroupTypes = fmt.Errorf(\"proto: unexpected end of group\")\n)\n```\n\n```go\nvar (\n\t// variance() supported input type and output type.\n\tAggVarianceSupportedParameters = []types.T{\n\t\ttypes.T_uint8, types.T_uint16, types.T_uint32, types.T_uint64,\n\t\ttypes.T_int8, types.T_int16, types.T_int32, types.T_int64,\n\t\ttypes.T_float32, types.T_float64,\n\t\ttypes.T_decimal64, types.T_decimal128,\n\t}\n\tAggVarianceReturnType = func(typs []types.Type) types.Type {\n\t\tif typs[0].IsDecimal() {\n\t\t\ts := int32(12)\n\t\t\tif typs[0].Scale \u003e s {\n\t\t\t\ts = typs[0].Scale\n\t\t\t}\n\t\t\treturn types.New(types.T_decimal128, 38, s)\n\t\t}\n\t\treturn types.New(types.T_float64, 0, 0)\n\t}\n)\n```\n\n```go\nvar (\n\t// approx_count() supported input type and output type.\n\tAggApproxCountReturnType = func(typs []types.Type) types.Type {\n\t\treturn types.T_uint64.ToType()\n\t}\n)\n```\n\n```go\nvar (\n\t// count() supported input type and output type.\n\tAggCountReturnType = func(typs []types.Type) types.Type {\n\t\treturn types.T_int64.ToType()\n\t}\n)\n```\n\n```go\nvar (\n\t// group_concat() supported input type and output type.\n\tAggGroupConcatReturnType = func(typs []types.Type) types.Type {\n\t\tfor _, p := range typs {\n\t\t\tif p.Oid == types.T_binary || p.Oid == types.T_varbinary || p.Oid == types.T_blob {\n\t\t\t\treturn types.T_blob.ToType()\n\t\t\t}\n\t\t}\n\t\treturn types.T_text.ToType()\n\t}\n)\n```\n\n```go\nvar (\n\t// dense_rank() supported input type and output type.\n\tWinDenseRankReturnType = func(typs []types.Type) types.Type {\n\t\treturn types.T_int64.ToType()\n\t}\n)\n```\n\n```go\nvar (\n\t// rank() supported input type and output type.\n\tWinRankReturnType = func(typs []types.Type) types.Type {\n\t\treturn types.T_int64.ToType()\n\t}\n)\n```\n\n```go\nvar (\n\t// row_number() supported input type and output type.\n\tWinRowNumberReturnType = func(typs []types.Type) types.Type {\n\t\treturn types.T_int64.ToType()\n\t}\n)\n```\n\n## Functions\n\n```go\nfunc NewAggAnyValue(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggApproxCount(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggAvg(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggBitAnd(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggBitOr(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggBitXor(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggClusterCenters(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, config any) (agg.Agg[any], error)\n```\nNewAggClusterCenters this agg func will take a vector/array column and run clustering algorithm like kmeans and return the 'k' centroids.\n\n```go\nfunc NewAggCount(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggGroupConcat(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, config any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggMax(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggMedian(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggMin(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggStarCount(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggStdDevPop(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggSum(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewAggVarPop(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewWinDenseRank(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewWinRank(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n```go\nfunc NewWinRowNumber(overloadID int64, dist bool, inputTypes []types.Type, outputType types.Type, _ any) (agg.Agg[any], error)\n```\n\n## Types\n\n```go\ntype Decimal128Median struct {\n\tVals []decimal128Slice `protobuf:\"bytes,1,rep,name=Vals,proto3,customtype=decimal128Slice\" json:\"Vals\"`\n}\n```\n\n```go\nfunc (*Decimal128Median) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Decimal128Median) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *Decimal128Median) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *Decimal128Median) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*Decimal128Median) ProtoMessage()\n```\n\n```go\nfunc (m *Decimal128Median) ProtoSize() (n int)\n```\n\n```go\nfunc (m *Decimal128Median) Reset()\n```\n\n```go\nfunc (m *Decimal128Median) String() string\n```\n\n```go\nfunc (m *Decimal128Median) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *Decimal128Median) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *Decimal128Median) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *Decimal128Median) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *Decimal128Median) XXX_Size() int\n```\n\n```go\nfunc (m *Decimal128Median) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype Decimal128SlicePB struct {\n\tSlice []github_com_matrixorigin_matrixone_pkg_container_types.Decimal128 `protobuf:\"bytes,1,rep,name=Slice,proto3,customtype=github.com/matrixorigin/matrixone/pkg/container/types.Decimal128\" json:\"Slice\"`\n}\n```\n\n```go\nfunc (*Decimal128SlicePB) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Decimal128SlicePB) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *Decimal128SlicePB) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *Decimal128SlicePB) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*Decimal128SlicePB) ProtoMessage()\n```\n\n```go\nfunc (m *Decimal128SlicePB) ProtoSize() (n int)\n```\n\n```go\nfunc (m *Decimal128SlicePB) Reset()\n```\n\n```go\nfunc (m *Decimal128SlicePB) String() string\n```\n\n```go\nfunc (m *Decimal128SlicePB) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *Decimal128SlicePB) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *Decimal128SlicePB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *Decimal128SlicePB) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *Decimal128SlicePB) XXX_Size() int\n```\n\n```go\nfunc (m *Decimal128SlicePB) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype Decimal64Median struct {\n\tVals []decimal64Slice `protobuf:\"bytes,1,rep,name=Vals,proto3,customtype=decimal64Slice\" json:\"Vals\"`\n}\n```\n\n```go\nfunc (*Decimal64Median) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Decimal64Median) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *Decimal64Median) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *Decimal64Median) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*Decimal64Median) ProtoMessage()\n```\n\n```go\nfunc (m *Decimal64Median) ProtoSize() (n int)\n```\n\n```go\nfunc (m *Decimal64Median) Reset()\n```\n\n```go\nfunc (m *Decimal64Median) String() string\n```\n\n```go\nfunc (m *Decimal64Median) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *Decimal64Median) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *Decimal64Median) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *Decimal64Median) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *Decimal64Median) XXX_Size() int\n```\n\n```go\nfunc (m *Decimal64Median) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype Decimal64SlicePB struct {\n\tSlice []github_com_matrixorigin_matrixone_pkg_container_types.Decimal64 `protobuf:\"bytes,1,rep,name=Slice,proto3,customtype=github.com/matrixorigin/matrixone/pkg/container/types.Decimal64\" json:\"Slice\"`\n}\n```\n\n```go\nfunc (*Decimal64SlicePB) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *Decimal64SlicePB) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *Decimal64SlicePB) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *Decimal64SlicePB) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*Decimal64SlicePB) ProtoMessage()\n```\n\n```go\nfunc (m *Decimal64SlicePB) ProtoSize() (n int)\n```\n\n```go\nfunc (m *Decimal64SlicePB) Reset()\n```\n\n```go\nfunc (m *Decimal64SlicePB) String() string\n```\n\n```go\nfunc (m *Decimal64SlicePB) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *Decimal64SlicePB) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *Decimal64SlicePB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *Decimal64SlicePB) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *Decimal64SlicePB) XXX_Size() int\n```\n\n```go\nfunc (m *Decimal64SlicePB) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype EncodeDecimalV struct {\n\tSum    []github_com_matrixorigin_matrixone_pkg_container_types.Decimal128 `protobuf:\"bytes,1,rep,name=sum,proto3,customtype=github.com/matrixorigin/matrixone/pkg/container/types.Decimal128\" json:\"sum,omitempty\"`\n\tCounts []int64                                                            `protobuf:\"varint,2,rep,packed,name=Counts,proto3\" json:\"Counts,omitempty\"`\n\tErrOne []bool                                                             `protobuf:\"varint,3,rep,packed,name=ErrOne,proto3\" json:\"ErrOne,omitempty\"`\n}\n```\n\n```go\nfunc (*EncodeDecimalV) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *EncodeDecimalV) GetCounts() []int64\n```\n\n```go\nfunc (m *EncodeDecimalV) GetErrOne() []bool\n```\n\n```go\nfunc (m *EncodeDecimalV) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *EncodeDecimalV) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *EncodeDecimalV) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*EncodeDecimalV) ProtoMessage()\n```\n\n```go\nfunc (m *EncodeDecimalV) ProtoSize() (n int)\n```\n\n```go\nfunc (m *EncodeDecimalV) Reset()\n```\n\n```go\nfunc (m *EncodeDecimalV) String() string\n```\n\n```go\nfunc (m *EncodeDecimalV) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *EncodeDecimalV) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *EncodeDecimalV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *EncodeDecimalV) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *EncodeDecimalV) XXX_Size() int\n```\n\n```go\nfunc (m *EncodeDecimalV) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype EncodeVariance struct {\n\tSum    []float64\n\tCounts []float64\n}\n```\n\n```go\nfunc (*EncodeVariance) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *EncodeVariance) GetCounts() []float64\n```\n\n```go\nfunc (m *EncodeVariance) GetSum() []float64\n```\n\n```go\nfunc (m *EncodeVariance) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *EncodeVariance) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *EncodeVariance) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*EncodeVariance) ProtoMessage()\n```\n\n```go\nfunc (m *EncodeVariance) ProtoSize() (n int)\n```\n\n```go\nfunc (m *EncodeVariance) Reset()\n```\n\n```go\nfunc (m *EncodeVariance) String() string\n```\n\n```go\nfunc (m *EncodeVariance) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *EncodeVariance) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *EncodeVariance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *EncodeVariance) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *EncodeVariance) XXX_Size() int\n```\n\n```go\nfunc (m *EncodeVariance) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype NumericMedian[T numeric] struct {\n\tVals []numericSlice[T]\n}\n```\n\n```go\ntype VarianceDecimal struct {\n\tSum         []types.Decimal128\n\tCounts      []int64\n\tTyp         types.Type\n\tScaleMul    int32\n\tScaleDiv    int32\n\tScaleMulDiv int32\n\tScaleDivMul int32\n\n\t// ErrOne indicates that there is only one row in the group.\n\t// but its ^2 is too large.\n\tErrOne []bool\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (*VarianceDecimal) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (s *VarianceDecimal) Dup() agg.AggStruct\n```\n\n```go\nfunc (s *VarianceDecimal) Eval(lastResult []types.Decimal128) ([]types.Decimal128, error)\n```\n\n```go\nfunc (s *VarianceDecimal) EvalStdDevPop(lastResult []types.Decimal128) ([]types.Decimal128, error)\n```\n\n```go\nfunc (s *VarianceDecimal) FillD128(groupNumber int64, v types.Decimal128, lastResult types.Decimal128, count int64, isEmpty bool, isNull bool) (types.Decimal128, bool, error)\n```\n\n```go\nfunc (s *VarianceDecimal) FillD64(groupNumber int64, v types.Decimal64, lastResult types.Decimal128, count int64, isEmpty bool, isNull bool) (types.Decimal128, bool, error)\n```\n\n```go\nfunc (s *VarianceDecimal) Free(_ *mpool.MPool)\n```\n\n```go\nfunc (m *VarianceDecimal) GetCounts() []int64\n```\n\n```go\nfunc (m *VarianceDecimal) GetErrOne() []bool\n```\n\n```go\nfunc (m *VarianceDecimal) GetScaleDiv() int32\n```\n\n```go\nfunc (m *VarianceDecimal) GetScaleDivMul() int32\n```\n\n```go\nfunc (m *VarianceDecimal) GetScaleMul() int32\n```\n\n```go\nfunc (m *VarianceDecimal) GetScaleMulDiv() int32\n```\n\n```go\nfunc (s *VarianceDecimal) Grows(cnt int)\n```\n\n```go\nfunc (m *VarianceDecimal) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (s *VarianceDecimal) MarshalBinary() ([]byte, error)\n```\n\n```go\nfunc (m *VarianceDecimal) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *VarianceDecimal) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (s *VarianceDecimal) Merge(groupNumber1 int64, groupNumber2 int64, result1 types.Decimal128, result2 types.Decimal128, isEmpty1 bool, isEmpty2 bool, priv2 any) (types.Decimal128, bool, error)\n```\n\n```go\nfunc (*VarianceDecimal) ProtoMessage()\n```\n\n```go\nfunc (m *VarianceDecimal) ProtoSize() (n int)\n```\n\n```go\nfunc (m *VarianceDecimal) Reset()\n```\n\n```go\nfunc (m *VarianceDecimal) String() string\n```\n\n```go\nfunc (m *VarianceDecimal) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (s *VarianceDecimal) UnmarshalBinary(data []byte) error\n```\n\n```go\nfunc (m *VarianceDecimal) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *VarianceDecimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *VarianceDecimal) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *VarianceDecimal) XXX_Size() int\n```\n\n```go\nfunc (m *VarianceDecimal) XXX_Unmarshal(b []byte) error\n```\n\n```go\ntype VariancePB struct {\n\tSum    []float64 `protobuf:\"fixed64,1,rep,packed,name=Sum,proto3\" json:\"Sum,omitempty\"`\n\tCounts []float64 `protobuf:\"fixed64,2,rep,packed,name=Counts,proto3\" json:\"Counts,omitempty\"`\n}\n```\n\n```go\nfunc (*VariancePB) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (m *VariancePB) GetCounts() []float64\n```\n\n```go\nfunc (m *VariancePB) GetSum() []float64\n```\n\n```go\nfunc (m *VariancePB) Marshal() (dAtA []byte, err error)\n```\n\n```go\nfunc (m *VariancePB) MarshalTo(dAtA []byte) (int, error)\n```\n\n```go\nfunc (m *VariancePB) MarshalToSizedBuffer(dAtA []byte) (int, error)\n```\n\n```go\nfunc (*VariancePB) ProtoMessage()\n```\n\n```go\nfunc (m *VariancePB) ProtoSize() (n int)\n```\n\n```go\nfunc (m *VariancePB) Reset()\n```\n\n```go\nfunc (m *VariancePB) String() string\n```\n\n```go\nfunc (m *VariancePB) Unmarshal(dAtA []byte) error\n```\n\n```go\nfunc (m *VariancePB) XXX_DiscardUnknown()\n```\n\n```go\nfunc (m *VariancePB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)\n```\n\n```go\nfunc (m *VariancePB) XXX_Merge(src proto.Message)\n```\n\n```go\nfunc (m *VariancePB) XXX_Size() int\n```\n\n```go\nfunc (m *VariancePB) XXX_Unmarshal(b []byte) error\n```\n\n","path":"github.com/matrixorigin/matrixone/pkg/sql/plan/function/functionAgg","name":"functionAgg","synopsis":"","isRedistributable":true}
