diff --git a/pkg/sql/plan/base_binder.go b/pkg/sql/plan/base_binder.go
index 342f28055ae283fc23486f60af3d027ced267d00..c60630e772f3102f382a2a4998ff048d671dfedc 100644
--- a/pkg/sql/plan/base_binder.go
+++ b/pkg/sql/plan/base_binder.go
@@ -804,7 +804,7 @@ func bindFuncExprImplByPlanExpr(name string, args []*Expr) (*plan.Expr, error) {
 				return nil, err
 			}
 		}
-	case "variance", "oct", "stddev_pop", "std":
+	case "variance", "oct", "stddev_pop", "std", "bit_and", "bit_or", "bit_xor":
 		if args[0].Typ.Id == int32(types.T_decimal128) || args[0].Typ.Id == int32(types.T_decimal64) {
 			args[0], err = appendCastBeforeExpr(args[0], &plan.Type{
 				Id:       int32(types.T_float64),
diff --git a/pkg/sql/plan/function/aggregate.go b/pkg/sql/plan/function/aggregate.go
index 6e97f5ec75b3c77a7fa03dbe4c8fa353a615e805..038a327af3b2b24941be4f8fc19bc5c925130fd4 100644
--- a/pkg/sql/plan/function/aggregate.go
+++ b/pkg/sql/plan/function/aggregate.go
@@ -616,6 +616,9 @@ var aggregates = map[int]Functions{
 				if inputs[0] == types.T_any {
 					return 0, nil
 				}
+				if !operator.IsNumeric(inputs[0]) && !operator.IsDecimal(inputs[0]) {
+					return wrongFuncParamForAgg, nil
+				}
 				_, err := aggregate.ReturnType(aggregate.BitAnd, types.Type{Oid: inputs[0]})
 				if err == nil {
 					return 0, nil
@@ -640,7 +643,7 @@ var aggregates = map[int]Functions{
 				if inputs[0] == types.T_any {
 					return 0, nil
 				}
-				if !operator.IsNumeric(inputs[0]) {
+				if !operator.IsNumeric(inputs[0]) && !operator.IsDecimal(inputs[0]) {
 					return wrongFuncParamForAgg, nil
 				}
 				_, err := aggregate.ReturnType(aggregate.BitOr, types.Type{Oid: inputs[0]})
@@ -667,7 +670,7 @@ var aggregates = map[int]Functions{
 				if inputs[0] == types.T_any {
 					return 0, nil
 				}
-				if !operator.IsNumeric(inputs[0]) {
+				if !operator.IsNumeric(inputs[0]) && !operator.IsDecimal(inputs[0]) {
 					return wrongFuncParamForAgg, nil
 				}
 				_, err := aggregate.ReturnType(aggregate.BitXor, types.Type{Oid: inputs[0]})
diff --git a/pkg/sql/plan/function/builtin/multi/ceil.go b/pkg/sql/plan/function/builtin/multi/ceil.go
index e000bd1cf7a36cb2bb12d04a84a9bf7bc29cb8fe..2bf8c79828270a4dd6ebd86095297d604f2db604 100644
--- a/pkg/sql/plan/function/builtin/multi/ceil.go
+++ b/pkg/sql/plan/function/builtin/multi/ceil.go
@@ -130,3 +130,28 @@ func CeilFloat64(vecs []*vector.Vector, proc *process.Process) (*vector.Vector,
 		return vec, nil
 	}
 }
+
+func CeilDecimal128(vecs []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
+	digits := int64(0)
+	vs := vector.MustTCols[types.Decimal128](vecs[0])
+	if vecs[0].IsScalar() {
+		if vecs[0].IsScalarNull() {
+			return proc.AllocScalarNullVector(types.Type{Oid: types.T_decimal128, Size: 16}), nil
+		}
+		vec := proc.AllocScalarVector(types.Type{Oid: types.T_decimal128, Size: 16})
+		rs := make([]types.Decimal128, 1)
+		nulls.Set(vec.Nsp, vecs[0].Nsp)
+		vector.SetCol(vec, ceil.CeilDecimal128(vecs[0].Typ.Scale, vs, rs, digits))
+		return vec, nil
+	} else {
+		vec, err := proc.AllocVector(types.Type{Oid: types.T_decimal128, Size: 16}, 16*int64(len(vs)))
+		if err != nil {
+			return nil, err
+		}
+		rs := types.DecodeDecimal128Slice(vec.Data)
+		rs = rs[:len(vs)]
+		nulls.Set(vec.Nsp, vecs[0].Nsp)
+		vector.SetCol(vec, ceil.CeilDecimal128(vecs[0].Typ.Scale, vs, rs, digits))
+		return vec, nil
+	}
+}
diff --git a/pkg/sql/plan/function/builtin/multi/floor.go b/pkg/sql/plan/function/builtin/multi/floor.go
index 4dd64ac8bae3df300af95f6521180041dd910748..3034ede786ec755762298a52d39e84531bd6ad63 100644
--- a/pkg/sql/plan/function/builtin/multi/floor.go
+++ b/pkg/sql/plan/function/builtin/multi/floor.go
@@ -206,7 +206,7 @@ func FloorDecimal128(vecs []*vector.Vector, proc *process.Process) (*vector.Vect
 		vec := proc.AllocScalarVector(types.Type{Oid: types.T_decimal128, Size: 16})
 		rs := make([]types.Decimal128, 1)
 		nulls.Set(vec.Nsp, vecs[0].Nsp)
-		vector.SetCol(vec, floor.FloorDecimal128(vs, rs, digits))
+		vector.SetCol(vec, floor.FloorDecimal128(vecs[0].Typ.Scale, vs, rs, digits))
 		return vec, nil
 	} else {
 		vec, err := proc.AllocVector(types.Type{Oid: types.T_decimal128, Size: 16}, 16*int64(len(vs)))
@@ -216,7 +216,7 @@ func FloorDecimal128(vecs []*vector.Vector, proc *process.Process) (*vector.Vect
 		rs := types.DecodeDecimal128Slice(vec.Data)
 		rs = rs[:len(vs)]
 		nulls.Set(vec.Nsp, vecs[0].Nsp)
-		vector.SetCol(vec, floor.FloorDecimal128(vs, rs, digits))
+		vector.SetCol(vec, floor.FloorDecimal128(vecs[0].Typ.Scale, vs, rs, digits))
 		return vec, nil
 	}
 }
diff --git a/pkg/sql/plan/function/builtin/unary/abs.go b/pkg/sql/plan/function/builtin/unary/abs.go
index 573a6885e9da6d7cbb75740092c5cdb3230a0b66..ed8659b3d244c2ea89f41f9442726db5cad7f59c 100644
--- a/pkg/sql/plan/function/builtin/unary/abs.go
+++ b/pkg/sql/plan/function/builtin/unary/abs.go
@@ -102,3 +102,29 @@ func AbsFloat64(vectors []*vector.Vector, proc *process.Process) (*vector.Vector
 		return resultVector, nil
 	}
 }
+
+func AbsDecimal128(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
+	inputVector := vectors[0]
+	resultType := types.Type{Oid: types.T_decimal128, Size: 16, Scale: inputVector.Typ.Scale}
+	resultElementSize := int(resultType.Size)
+	inputValues := vector.MustTCols[types.Decimal128](inputVector)
+	if inputVector.IsScalar() {
+		if inputVector.ConstVectorIsNull() {
+			return proc.AllocScalarNullVector(resultType), nil
+		}
+		resultVector := vector.NewConst(resultType, 1)
+		resultValues := make([]types.Decimal128, 1)
+		vector.SetCol(resultVector, abs.AbsDecimal128(inputValues, resultValues))
+		return resultVector, nil
+	} else {
+		resultVector, err := proc.AllocVector(resultType, int64(resultElementSize*len(inputValues)))
+		if err != nil {
+			return nil, err
+		}
+		resultValues := types.DecodeDecimal128Slice(resultVector.Data)
+		resultValues = resultValues[:len(inputValues)]
+		nulls.Set(resultVector.Nsp, inputVector.Nsp)
+		vector.SetCol(resultVector, abs.AbsDecimal128(inputValues, resultValues))
+		return resultVector, nil
+	}
+}
diff --git a/pkg/sql/plan/function/builtin/unary/math.go b/pkg/sql/plan/function/builtin/unary/math.go
index 504225c79fb03a453a0b8b596cb5d6ae2f6277d2..a2626e82a6f58e3064dff9532db51a2d07950e22 100644
--- a/pkg/sql/plan/function/builtin/unary/math.go
+++ b/pkg/sql/plan/function/builtin/unary/math.go
@@ -18,6 +18,8 @@ import (
 	"github.com/matrixorigin/matrixone/pkg/container/nulls"
 	"github.com/matrixorigin/matrixone/pkg/container/types"
 	"github.com/matrixorigin/matrixone/pkg/container/vector"
+	"github.com/matrixorigin/matrixone/pkg/sql/errors"
+	"github.com/matrixorigin/matrixone/pkg/sql/plan/function/operator"
 	"github.com/matrixorigin/matrixone/pkg/vectorize/momath"
 	"github.com/matrixorigin/matrixone/pkg/vm/process"
 )
@@ -85,8 +87,24 @@ func Ln(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
 }
 
 func Log(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
-	// MySQL log is the same as ln.
-	return math1(vs, proc, momath.Ln)
+	if len(vs) == 1 {
+		return math1(vs, proc, momath.Ln)
+	}
+	vals := vs[0].Col.([]float64)
+	for i := range vals {
+		if vals[i] == float64(1) {
+			return nil, errors.New("", "Logarithm function base cannot be 1")
+		}
+	}
+	v1, err := math1([]*vector.Vector{vs[0]}, proc, momath.Ln)
+	if err != nil {
+		return nil, err
+	}
+	v2, err := math1([]*vector.Vector{vs[1]}, proc, momath.Ln)
+	if err != nil {
+		return nil, err
+	}
+	return operator.DivFloat[float64]([]*vector.Vector{v2, v1}, proc)
 }
 
 func Sin(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
diff --git a/pkg/sql/plan/function/builtins.go b/pkg/sql/plan/function/builtins.go
index 4336fb5d67dcf96e38a80718ee70899d3e1bc8bc..2e47a6d2320824b73b1fe75fd89595a447bd0d36 100644
--- a/pkg/sql/plan/function/builtins.go
+++ b/pkg/sql/plan/function/builtins.go
@@ -62,6 +62,14 @@ var builtins = map[int]Functions{
 				ReturnTyp: types.T_float64,
 				Fn:        unary.AbsFloat64,
 			},
+			{
+				Index:     3,
+				Flag:      plan.Function_STRICT,
+				Layout:    STANDARD_FUNCTION,
+				Args:      []types.T{types.T_decimal128},
+				ReturnTyp: types.T_decimal128,
+				Fn:        unary.AbsDecimal128,
+			},
 		},
 	},
 	ACOS: {
@@ -378,6 +386,14 @@ var builtins = map[int]Functions{
 				ReturnTyp: types.T_float64,
 				Fn:        unary.Log,
 			},
+			{
+				Index:     1,
+				Flag:      plan.Function_STRICT,
+				Layout:    STANDARD_FUNCTION,
+				Args:      []types.T{types.T_float64, types.T_float64},
+				ReturnTyp: types.T_float64,
+				Fn:        unary.Log,
+			},
 		},
 	},
 	LTRIM: {
@@ -780,6 +796,14 @@ var builtins = map[int]Functions{
 				ReturnTyp: types.T_float64,
 				Fn:        multi.CeilFloat64,
 			},
+			{
+				Index:     6,
+				Flag:      plan.Function_STRICT,
+				Layout:    STANDARD_FUNCTION,
+				Args:      []types.T{types.T_decimal128},
+				ReturnTyp: types.T_decimal128,
+				Fn:        multi.CeilDecimal128,
+			},
 		},
 	},
 	FLOOR: {
@@ -838,7 +862,8 @@ var builtins = map[int]Functions{
 				Flag:      plan.Function_STRICT,
 				Layout:    STANDARD_FUNCTION,
 				Args:      []types.T{types.T_decimal128},
-				ReturnTyp: types.T_decimal128, Fn: multi.FloorDecimal128,
+				ReturnTyp: types.T_decimal128,
+				Fn:        multi.FloorDecimal128,
 			},
 		},
 	},
diff --git a/pkg/sql/plan/function/function.go b/pkg/sql/plan/function/function.go
index 9299bdc82a03759a3f702e359c8234119bfd883d..8fcaa8a1c64c6484386aa5479f725b96c0373cc2 100644
--- a/pkg/sql/plan/function/function.go
+++ b/pkg/sql/plan/function/function.go
@@ -244,8 +244,15 @@ func GetFunctionByName(name string, args []types.Type) (int64, types.Type, []typ
 	case wrongFunctionParameters:
 		ArgsToPrint := getOidSlice(finalTypes) // arg information to print for error message
 		if len(fs.Overloads) > 0 && fs.Overloads[0].isFunction() {
+			// TODO: need to confirm the params supported by each function, and then process the error msg uniformly
+			if confirmFuncNameCurrently(name) {
+				return -1, emptyType, nil, errors.New(errno.UndefinedFunction, fmt.Sprintf("Function '%s' with parameters %v is not supported.", name, ArgsToPrint))
+			}
 			return -1, emptyType, nil, errors.New(errno.UndefinedFunction, fmt.Sprintf("Function '%s' with parameters %v will be implemented in future version.", name, ArgsToPrint))
 		}
+		if confirmFuncNameCurrently(name) {
+			return -1, emptyType, nil, errors.New(errno.UndefinedFunction, fmt.Sprintf("Operator '%s' with parameters %v is not supported.", name, ArgsToPrint))
+		}
 		return -1, emptyType, nil, errors.New(errno.UndefinedFunction, fmt.Sprintf("Operator '%s' with parameters %v will be implemented in future version.", name, ArgsToPrint))
 	case tooManyFunctionsMatched:
 		return -1, emptyType, nil, errors.New(errno.AmbiguousParameter, fmt.Sprintf("too many overloads matched for '%s%v'", name, args))
@@ -260,6 +267,33 @@ func GetFunctionByName(name string, args []types.Type) (int64, types.Type, []typ
 	return EncodeOverloadID(fid, index), rt, targetTypes, nil
 }
 
+var confirmNames []string = []string{
+	"oct",
+	"sin",
+	"cos",
+	"tan",
+	"cot",
+	"acros",
+	"atan",
+	"sinh",
+	"log",
+	"cast",
+	"abs",
+	"weekday",
+	"dayofyear",
+	"round",
+	"if",
+}
+
+func confirmFuncNameCurrently(name string) bool {
+	for i := range confirmNames {
+		if name == confirmNames[i] {
+			return true
+		}
+	}
+	return false
+}
+
 func ensureBinaryOperatorWithSamePrecision(targets []types.Type, hasSet []bool) {
 	if len(targets) == 2 && targets[0].Oid == targets[1].Oid {
 		if hasSet[0] && !hasSet[1] { // precision follow the left-part
diff --git a/pkg/sql/plan/function/operator/arith.go b/pkg/sql/plan/function/operator/arith.go
index f5683bc8098f2c15875f012e26240cc75ff0a995..8ca02d56eec4d72720044bf455c38f5fe8c77f90 100644
--- a/pkg/sql/plan/function/operator/arith.go
+++ b/pkg/sql/plan/function/operator/arith.go
@@ -167,11 +167,23 @@ func DivFloat[T constraints.Float](args []*vector.Vector, proc *process.Process)
 	return Arith[T, T](args, proc, args[0].GetType(), div.NumericDivFloat[T])
 }
 func DivDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
-	resultTyp := types.Type{Oid: types.T_decimal128, Size: types.DECIMAL128_NBYTES, Width: types.DECIMAL128_WIDTH, Scale: types.MYSQL_DEFAULT_SCALE}
+	var scale int32
+	if args[0].Typ.Scale == 0 {
+		scale = types.MYSQL_DEFAULT_SCALE
+	} else {
+		scale = types.MYSQL_DEFAULT_SCALE + args[0].Typ.Scale
+	}
+	resultTyp := types.Type{Oid: types.T_decimal128, Size: types.DECIMAL128_NBYTES, Width: types.DECIMAL128_WIDTH, Scale: scale}
 	return Arith[types.Decimal64, types.Decimal128](args, proc, resultTyp, div.Decimal64VecDiv)
 }
 func DivDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error) {
-	resultTyp := types.Type{Oid: types.T_decimal128, Size: types.DECIMAL128_NBYTES, Width: types.DECIMAL128_WIDTH, Scale: types.MYSQL_DEFAULT_SCALE}
+	var scale int32
+	if args[0].Typ.Scale == 0 {
+		scale = types.MYSQL_DEFAULT_SCALE
+	} else {
+		scale = types.MYSQL_DEFAULT_SCALE + args[0].Typ.Scale
+	}
+	resultTyp := types.Type{Oid: types.T_decimal128, Size: types.DECIMAL128_NBYTES, Width: types.DECIMAL128_WIDTH, Scale: scale}
 	return Arith[types.Decimal128, types.Decimal128](args, proc, resultTyp, div.Decimal128VecDiv)
 }
 
diff --git a/pkg/vectorize/abs/abs.go b/pkg/vectorize/abs/abs.go
index 97ad5cf184741179e8522757fd16da0d098f1455..565b4d3d6da9b1f4a6a657f1d15b7ee97d82d9d8 100644
--- a/pkg/vectorize/abs/abs.go
+++ b/pkg/vectorize/abs/abs.go
@@ -16,20 +16,22 @@ package abs
 
 import (
 	"github.com/matrixorigin/matrixone/pkg/common/moerr"
+	"github.com/matrixorigin/matrixone/pkg/container/types"
 	"golang.org/x/exp/constraints"
 )
 
 var (
-	AbsUint8   func([]uint8, []uint8) []uint8
-	AbsUint16  func([]uint16, []uint16) []uint16
-	AbsUint32  func([]uint32, []uint32) []uint32
-	AbsUint64  func([]uint64, []uint64) []uint64
-	AbsInt8    func([]int8, []int8) []int8
-	AbsInt16   func([]int16, []int16) []int16
-	AbsInt32   func([]int32, []int32) []int32
-	AbsInt64   func([]int64, []int64) []int64
-	AbsFloat32 func([]float32, []float32) []float32
-	AbsFloat64 func([]float64, []float64) []float64
+	AbsUint8      func([]uint8, []uint8) []uint8
+	AbsUint16     func([]uint16, []uint16) []uint16
+	AbsUint32     func([]uint32, []uint32) []uint32
+	AbsUint64     func([]uint64, []uint64) []uint64
+	AbsInt8       func([]int8, []int8) []int8
+	AbsInt16      func([]int16, []int16) []int16
+	AbsInt32      func([]int32, []int32) []int32
+	AbsInt64      func([]int64, []int64) []int64
+	AbsFloat32    func([]float32, []float32) []float32
+	AbsFloat64    func([]float64, []float64) []float64
+	AbsDecimal128 func([]types.Decimal128, []types.Decimal128) []types.Decimal128
 )
 
 func init() {
@@ -43,6 +45,7 @@ func init() {
 	AbsInt64 = absSigned[int64]
 	AbsFloat32 = absSigned[float32]
 	AbsFloat64 = absSigned[float64]
+	AbsDecimal128 = absDecimal128
 }
 
 // Unsigned simply return
@@ -64,3 +67,14 @@ func absSigned[T constraints.Signed | constraints.Float](xs, rs []T) []T {
 	}
 	return rs
 }
+
+func absDecimal128(xs []types.Decimal128, rs []types.Decimal128) []types.Decimal128 {
+	for i := range xs {
+		if xs[i].Lt(types.Decimal128_FromInt32(0)) {
+			rs[i] = types.NegDecimal128(xs[i])
+		} else {
+			rs[i] = xs[i]
+		}
+	}
+	return rs
+}
diff --git a/pkg/vectorize/ceil/ceil.go b/pkg/vectorize/ceil/ceil.go
index 5ae799fd3fb841009db67e9da96f106dac2ceabb..cc3090367d2364bb8159bc4e90770fcf6f8f82e9 100644
--- a/pkg/vectorize/ceil/ceil.go
+++ b/pkg/vectorize/ceil/ceil.go
@@ -15,7 +15,10 @@
 package ceil
 
 import (
+	"github.com/matrixorigin/matrixone/pkg/container/types"
 	"math"
+	"strconv"
+	"strings"
 
 	"github.com/matrixorigin/matrixone/pkg/vectorize/floor"
 )
@@ -26,16 +29,17 @@ ceil(1.23, 1) -----> 1.3
 ceil(12.34, -1) ---- > 20.0*/
 
 var (
-	CeilUint8   func([]uint8, []uint8, int64) []uint8
-	CeilUint16  func([]uint16, []uint16, int64) []uint16
-	CeilUint32  func([]uint32, []uint32, int64) []uint32
-	CeilUint64  func([]uint64, []uint64, int64) []uint64
-	CeilInt8    func([]int8, []int8, int64) []int8
-	CeilInt16   func([]int16, []int16, int64) []int16
-	CeilInt32   func([]int32, []int32, int64) []int32
-	CeilInt64   func([]int64, []int64, int64) []int64
-	CeilFloat32 func([]float32, []float32, int64) []float32
-	CeilFloat64 func([]float64, []float64, int64) []float64
+	CeilUint8      func([]uint8, []uint8, int64) []uint8
+	CeilUint16     func([]uint16, []uint16, int64) []uint16
+	CeilUint32     func([]uint32, []uint32, int64) []uint32
+	CeilUint64     func([]uint64, []uint64, int64) []uint64
+	CeilInt8       func([]int8, []int8, int64) []int8
+	CeilInt16      func([]int16, []int16, int64) []int16
+	CeilInt32      func([]int32, []int32, int64) []int32
+	CeilInt64      func([]int64, []int64, int64) []int64
+	CeilFloat32    func([]float32, []float32, int64) []float32
+	CeilFloat64    func([]float64, []float64, int64) []float64
+	CeilDecimal128 func(int32, []types.Decimal128, []types.Decimal128, int64) []types.Decimal128
 )
 
 func init() {
@@ -49,6 +53,7 @@ func init() {
 	CeilInt64 = ceilInt64
 	CeilFloat32 = ceilFloat32
 	CeilFloat64 = ceilFloat64
+	CeilDecimal128 = ceilDecimal128
 }
 
 func ceilUint8(xs, rs []uint8, digits int64) []uint8 {
@@ -289,3 +294,21 @@ func ceilFloat64(xs, rs []float64, digits int64) []float64 {
 	}
 	return rs
 }
+
+func ceilDecimal128(scale int32, xs, rs []types.Decimal128, _ int64) []types.Decimal128 {
+	for i := range xs {
+		strs := strings.Split(xs[i].ToStringWithScale(scale), ".")
+		x, _ := types.Decimal128_FromString(strs[0])
+		if strs[0][0] == '-' || len(strs) == 1 {
+			rs[i] = x
+			continue
+		}
+
+		v, _ := strconv.ParseFloat(strs[1], 64)
+		if v > float64(0) {
+			x = x.AddInt64(1)
+		}
+		rs[i] = x
+	}
+	return rs
+}
diff --git a/pkg/vectorize/floor/floor.go b/pkg/vectorize/floor/floor.go
index 69af26e30019878709f47b5160c7e0062db62aaf..77e64c29ab9eae5dacef5c1aae91e83de5a51b0c 100644
--- a/pkg/vectorize/floor/floor.go
+++ b/pkg/vectorize/floor/floor.go
@@ -36,6 +36,7 @@ N >= 0, floor to the Nth placeholder after decimal point
 import (
 	"github.com/matrixorigin/matrixone/pkg/container/types"
 	"math"
+	"strconv"
 	"strings"
 )
 
@@ -50,7 +51,7 @@ var (
 	FloorInt64      func([]int64, []int64, int64) []int64
 	FloorFloat32    func([]float32, []float32, int64) []float32
 	FloorFloat64    func([]float64, []float64, int64) []float64
-	FloorDecimal128 func([]types.Decimal128, []types.Decimal128, int64) []types.Decimal128
+	FloorDecimal128 func(int32, []types.Decimal128, []types.Decimal128, int64) []types.Decimal128
 )
 
 var MaxUint8digits = numOfDigits(math.MaxUint8)
@@ -292,15 +293,19 @@ func floorFloat64(xs, rs []float64, digits int64) []float64 {
 	return rs
 }
 
-func floorDecimal128(xs, rs []types.Decimal128, _ int64) []types.Decimal128 {
+func floorDecimal128(scale int32, xs, rs []types.Decimal128, _ int64) []types.Decimal128 {
 	for i := range xs {
-		str := strings.Split(xs[i].String(), ".")[0]
-		x, _ := types.Decimal128_FromString(str)
-		if str[0] != '-' {
+		strs := strings.Split(xs[i].ToStringWithScale(scale), ".")
+		x, _ := types.Decimal128_FromString(strs[0])
+		if strs[0][0] != '-' || len(strs) == 1 {
 			rs[i] = x
 			continue
 		}
-		rs[i] = x.AddInt64(-1)
+		v, _ := strconv.ParseFloat(strs[1], 64)
+		if v > float64(0) {
+			x = x.AddInt64(-1)
+		}
+		rs[i] = x
 	}
 	return rs
 }
diff --git a/test/cases/function/func_aggr_bitwise.test b/test/cases/function/func_aggr_bitwise.test
index f92ac1e4913e8fc46e03d3d8c82977d03dc63985..bd32c23f0eed8c0c49fc9a7108885508b4b84a54 100644
--- a/test/cases/function/func_aggr_bitwise.test
+++ b/test/cases/function/func_aggr_bitwise.test
@@ -28,7 +28,7 @@ insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
 select bit_and(a) from t1;
 select bit_and(b) from t1;
-select bit_and(c) from t1;
+select bit_and(c) from t1; 
 select bit_and(d) from t1;
 select bit_and(e) from t1;
 
@@ -37,12 +37,10 @@ select bit_and(f) from t1;
 
 select bit_and(g) from t1;
 
--- @bvt:issue#3588
 select bit_and(h) from t1;
 select bit_and(i) from t1;
 select bit_and(k) from t1;
 select bit_and(l) from t1;
--- @bvt:issue
 -- @bvt:issue#3373
 select bit_and(m) from t1;
 select bit_and(n) from t1;
@@ -65,12 +63,10 @@ select bit_or(f) from t1;
 
 select bit_or(g) from t1;
 
--- @bvt:issue#3588
 select bit_or(h) from t1;
 select bit_or(i) from t1;
 select bit_or(k) from t1;
 select bit_or(l) from t1;
--- @bvt:issue
 -- @bvt:issue#3373
 select bit_or(m) from t1;
 select bit_or(n) from t1;
@@ -92,12 +88,10 @@ select bit_xor(f) from t1;
 
 select bit_xor(g) from t1;
 
--- @bvt:issue#3588
 select bit_xor(h) from t1;
 select bit_xor(i) from t1;
 select bit_xor(k) from t1;
 select bit_xor(l) from t1;
--- @bvt:issue
 -- @bvt:issue#3373
 select bit_xor(m) from t1;
 select bit_xor(n) from t1;
diff --git a/test/cases/function/func_aggr_count.test b/test/cases/function/func_aggr_count.test
index e54defa27062d721efdb3928112be97b78e6af6f..955f1a7554642272dc4b120784c88e64daf0a457 100644
--- a/test/cases/function/func_aggr_count.test
+++ b/test/cases/function/func_aggr_count.test
@@ -191,7 +191,7 @@ select i, count(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
 select i, count(*), std(e1/e2) from bug22555 group by i order by i;
 select std(s1/s2) from bug22555;
 select std(o1/o2) from bug22555;
--- @bvt:issue#3588
+-- @bvt:issue#4692
 select std(e1/e2) from bug22555;
 -- @bvt:issue
 select i, count(*), std(s1/s2) from bug22555 group by i order by i;
@@ -199,7 +199,7 @@ select i, count(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
 select i, count(*), std(e1/e2) from bug22555 group by i order by i;
 select round(std(s1/s2), 17) from bug22555;
 select std(o1/o2) from bug22555;
--- @bvt:issue#3588
+-- @bvt:issue#4692
 select round(std(e1/e2), 17) from bug22555;
 -- @bvt:issue
 drop table bug22555;
diff --git a/test/cases/function/func_aggr_variance.test b/test/cases/function/func_aggr_variance.test
index c211ffe79c19ba8723169ff3c61d1ba7daade97c..83bc34c44f5f6d4a35e4f419f341072e6b5b70b7 100644
--- a/test/cases/function/func_aggr_variance.test
+++ b/test/cases/function/func_aggr_variance.test
@@ -15,7 +15,7 @@ select variance(e) from t1;
 select variance(f) from t1;
 select variance(g) from t1;
 
--- @bvt:issue#3588
+-- @bvt:issue#4691
 select variance(h) from t1;
 select variance(i) from t1;
 select variance(k) from t1;
diff --git a/test/cases/function/func_coalesce.test b/test/cases/function/func_coalesce.test
index 223b6d2117d9ab08e7726e2cc610e18c25daab84..4483c107b8fa5328f698104852aed6d72007ef6c 100644
--- a/test/cases/function/func_coalesce.test
+++ b/test/cases/function/func_coalesce.test
@@ -37,7 +37,7 @@ DROP TABLE t0;
 # Comparison
 CREATE TABLE t1 (a char(10), b INT);
 INSERT INTO t1 VALUES ('', 0);
--- @bvt:issue#3588
+-- @bvt:issue#4696
 SELECT COALESCE(a) = COALESCE(b) FROM t1;
 -- @bvt:issue
 DROP TABLE t1;
@@ -118,7 +118,7 @@ drop table it3;
 #DATATYPE, distinct
 CREATE TABLE t1 (dt2 DATETIME(2), t3 TIMESTAMP, d DATE);
 INSERT INTO t1 VALUES ('2001-01-01 00:00:00.12', '2001-01-01 00:00:00.567', '2002-01-01');
--- @bvt:issue#3588
+-- @bvt:issue#4696
 SELECT distinct COALESCE(dt2, t3) FROM t1;
 SELECT CONCAT_WS(",", COALESCE(dt2, t3)) FROM t1;
 -- @bvt:issue
@@ -127,33 +127,25 @@ DROP TABLE t1;
 #SELECT 宓屽
 CREATE TABLE t1 (a DATE);
 INSERT INTO t1 VALUES ('2000-01-01');
--- @bvt:issue#3588
 SELECT CAST(COALESCE(a,a) AS SIGNED) FROM t1;
--- @bvt:issue
 SELECT CAST(COALESCE(a,a) AS CHAR) FROM t1;
--- @bvt:issue#3588
 SELECT CAST(COALESCE(a,a) AS DECIMAL(25,3)) FROM t1;
--- @bvt:issue
 SELECT CAST(COALESCE(a,a) AS DATETIME(6)) FROM t1;
--- @bvt:issue#3588
+-- @bvt:issue#4689
 SELECT CAST(COALESCE(a,a) AS TIME(6)) FROM t1;
-SELECT ROUND(COALESCE(a,a)) FROM t1;
 -- @bvt:issue
+SELECT ROUND(COALESCE(a,a)) FROM t1;
 DROP TABLE t1;
 CREATE TABLE t1 (a DATETIME);
 INSERT INTO t1 VALUES ('2000-01-01 00:00:00');
--- @bvt:issue#3588
 SELECT CAST(COALESCE(a,a) AS SIGNED) FROM t1;
--- @bvt:issue
 SELECT CAST(COALESCE(a,a) AS CHAR) FROM t1;
--- @bvt:issue#3588
 SELECT CAST(COALESCE(a,a) AS DECIMAL(25,3)) FROM t1;
--- @bvt:issue
 SELECT CAST(COALESCE(a,a) AS DATETIME(6)) FROM t1;
--- @bvt:issue#3588
+-- @bvt:issue#4689
 SELECT CAST(COALESCE(a,a) AS TIME(6)) FROM t1;
-SELECT ROUND(COALESCE(a,a)) FROM t1;
 -- @bvt:issue
+SELECT ROUND(COALESCE(a,a)) FROM t1;
 DROP TABLE t1;
 
 #null
diff --git a/test/cases/function/func_datetime_date.test b/test/cases/function/func_datetime_date.test
index d0901429878812093a2a4712fcd260d98ab17be6..af49eb34aa392d5da0a4a6f8ca78876a5aa1a9c6 100644
--- a/test/cases/function/func_datetime_date.test
+++ b/test/cases/function/func_datetime_date.test
@@ -1,11 +1,7 @@
 #鍚勭鏁版嵁绫诲瀷
--- @bvt:issue#3588
 SELECT DATE(0.0124);
--- @bvt:issue
 SELECT DATE("2112123");
--- @bvt:issue#3588
 SELECT DATE(1231241.4513);
--- @bvt:issue
 SELECT DATE("2017-06-15");
 
 
@@ -27,9 +23,7 @@ select date(NULL);
 CREATE TABLE t1 (d1 datetime);
 INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
 ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00');
--- @bvt:issue#3588
 SELECT cast(date(d1) as signed) FROM t1;
--- @bvt:issue
 drop table t1;
 
 
@@ -38,9 +32,7 @@ drop table t1;
 CREATE TABLE t1 (d1 datetime);
 INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
 ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00');
--- @bvt:issue#3588
 SELECT sum(date(d1)) FROM t1;
--- @bvt:issue
 drop table t1;
 
 
@@ -61,9 +53,7 @@ select date("1997-12-31 23:59:59.000001");
 
 
 select date("1997-13-31 23:59:59.000001");
--- @bvt:issue#3588
 SELECT DATE(20110512154559.6 + 0e0);
--- @bvt:issue
 
 SELECT DATE(concat_ws('a', 0));
 
@@ -89,9 +79,7 @@ DROP TABLE t1;
 
 
 #EXTREME VALUES
--- @bvt:issue#3588
 SELECT DATE(20110512154559.616), DATE(FLOOR(20110512154559.616));
--- @bvt:issue
 
 #鍚勭鏁版嵁绫诲瀷
 DROP TABLE IF EXISTS t3;
diff --git a/test/cases/function/func_datetime_date_add.test b/test/cases/function/func_datetime_date_add.test
index a4dd61c333667ee080c6e1924c240b6a213e6eb7..7363e582e2bcc2b079eb406716b54bf608c27be1 100644
--- a/test/cases/function/func_datetime_date_add.test
+++ b/test/cases/function/func_datetime_date_add.test
@@ -214,7 +214,6 @@ select b from t1 group by b having (date_add(t1.b, INTERVAL 1 day)-date_add(t1.b
 drop table t1;
 -- @bvt:issue
 
--- @bvt:issue#3588
 SELECT
 DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
 DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
@@ -226,7 +225,6 @@ OCT(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
 OCT(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field1_str2,
 OCT(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
 OCT(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
--- @bvt:issue
 
 
 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1 1:1:1.000002" DAY_MICROSECOND);
diff --git a/test/cases/function/func_datetime_dayofyear.test b/test/cases/function/func_datetime_dayofyear.test
index 307fe5417d981fac81952e6b1461983003e92693..865d0b74b0320bc8fdd48b0c139d317ad7d86847 100644
--- a/test/cases/function/func_datetime_dayofyear.test
+++ b/test/cases/function/func_datetime_dayofyear.test
@@ -15,10 +15,8 @@ insert into t1 values(1, 1, 2, 43, 5, 35.5, 31.133, 14.314, "2012-03-10", "2012-
 insert into t1 values(71, 1, 2, 34, 5, 5.5, 341.13, 15.314, "2012-03-22", "2013-03-12 10:03:12", "2032-03-12 13:04:12", "abr23c", "3dcf");
 insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015-03-12 10:03:12", "2002-03-12 13:03:12", "afbc", "dct5f");
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
--- @bvt:issue#3588
 select dayofyear(a),dayofyear(b),dayofyear(c),dayofyear(d),dayofyear(e),dayofyear(f) from t1;
 select dayofyear(g),dayofyear(h),dayofyear(i),dayofyear(k),dayofyear(l),dayofyear(m),dayofyear(n) from t1;
--- @bvt:issue
 drop table t1;
 
 
@@ -33,14 +31,12 @@ drop table t1;
 
 
 SELECT dayofyear("2015-09-03") as dayofyear;
--- @bvt:issue#3588
 SELECT dayofyear(20150904) as dayofyear;
 SELECT dayofyear(1340124) as dayofyear;
 SELECT dayofyear(0.45133) as dayofyear;
 SELECT dayofyear(10) as dayofyear;
 SELECT dayofyear(1=1) as dayofyear;
 SELECT dayofyear('2015-09.30') as dayofyear;
--- @bvt:issue
 
 SELECT dayofyear('2015-0') as dayofyear;
 
diff --git a/test/cases/function/func_datetime_extract.test b/test/cases/function/func_datetime_extract.test
index d4b92c81e5845850ad90d516f5396a0fe6f059ba..b718f8c39f35c6f248f4255303a759496fa4d5be 100644
--- a/test/cases/function/func_datetime_extract.test
+++ b/test/cases/function/func_datetime_extract.test
@@ -54,7 +54,7 @@ DROP TABLE t1;
 
 
 #EXTREME VALUE
--- @bvt:issue#3588
+-- @bvt:issue#4689
 select extract(DAY_MINUTE FROM "02 10:11:12");
 select extract(DAY_SECOND FROM "225 10:11:12");
 select extract(HOUR_MINUTE FROM "10:11:12");
diff --git a/test/cases/function/func_datetime_unixtime.test b/test/cases/function/func_datetime_unixtime.test
index 8001b12e69aee1be1e21986d166372d8458683c0..3f8b04f74b5ade3faa36df20558b239912a2fd30 100644
--- a/test/cases/function/func_datetime_unixtime.test
+++ b/test/cases/function/func_datetime_unixtime.test
@@ -43,7 +43,6 @@ unix_timestamp('2038-01-19 04:14:07'),
 unix_timestamp('2038-01-19 04:14:08');
 
 SET time_zone='+00:00';
--- @bvt:issue#3588
 CREATE TABLE t1 (a DECIMAL(20,7));
 INSERT INTO t1 VALUES
 (32536771199.999999),
@@ -59,7 +58,6 @@ INSERT INTO t1 VALUES
 (32536771199.9999999);
 SELECT a, FROM_UNIXTIME(a) FROM t1;
 DROP TABLE t1;
--- @bvt:issue
 
 SET time_zone='+00:00';
 SELECT
@@ -106,6 +104,4 @@ SELECT FROM_UNIXTIME(9223372036854775807);
 SELECT FROM_UNIXTIME(-9223372036854775808);
 SELECT FROM_UNIXTIME(9223372036854775808);
 
--- @bvt:issue#3588
 SELECT FROM_UNIXTIME(99999999999999999999999999999999999999999999999999999999999999999);
--- @bvt:issue
diff --git a/test/cases/function/func_datetime_weekday.test b/test/cases/function/func_datetime_weekday.test
index 6e0e0f2967734289e7ef0d4f1fc0f6e6086d88d1..b05ce7b19efb1a96994d3cd300cf4f450c8be908 100644
--- a/test/cases/function/func_datetime_weekday.test
+++ b/test/cases/function/func_datetime_weekday.test
@@ -13,10 +13,8 @@ insert into t1 values(1, 1, 2, 43, 5, 35.5, 31.133, 14.314, "2012-03-10", "2012-
 insert into t1 values(71, 1, 2, 34, 5, 5.5, 341.13, 15.314, "2012-03-22", "2013-03-12 10:03:12", "2032-03-12 13:04:12", "abr23c", "3dcf");
 insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015-03-12 10:03:12", "2002-03-12 13:03:12", "afbc", "dct5f");
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
--- @bvt:issue#3588
 select weekday(a),weekday(b),weekday(c),weekday(d),weekday(e),weekday(f) from t1;
 select weekday(g),weekday(h),weekday(i),weekday(k),weekday(l),weekday(m),weekday(n) from t1;
--- @bvt:issue
 drop table t1;
 
 
@@ -32,13 +30,11 @@ drop table t1;
 
 
 SELECT weekday("2015-09-03") as weekday;
--- @bvt:issue#3588
-SELECT weekday(20150904) as weekday;
+SELECT weekday('20150904') as weekday;
 SELECT weekday(1340124) as weekday;
 SELECT weekday(0.45133) as weekday;
 SELECT weekday(10) as weekday;
 SELECT weekday(1=1) as weekday;
--- @bvt:issue
 SELECT weekday('2015-09.30') as weekday;
 
 SELECT weekday('2015-0') as weekday;
diff --git a/test/cases/function/func_if.test b/test/cases/function/func_if.test
index 899862ae02399539c6280f6ed4c795b8b040f14f..74ec677139829b051001132122e88a5f95d7e52a 100644
--- a/test/cases/function/func_if.test
+++ b/test/cases/function/func_if.test
@@ -3,10 +3,8 @@ SELECT IF(NULL AND 1, 1, 2), IF(1 AND NULL, 1, 2);
 
 create table t1 (a int);
 insert into t1 values (0),(1),(NULL);
--- @bvt:issue#3588
 SELECT * FROM t1 WHERE IF(a AND 1, 0, 1);
 SELECT * FROM t1 WHERE IF(1 AND a, 0, 1);
--- @bvt:issue
 drop table t1;
 
 drop table if exists t;
@@ -20,23 +18,19 @@ INSERT INTO t VALUES ( 6,    6.0,  10.0/3),
 SELECT coalesce(e2,i1) nullif_c, IF(e2 IS NULL,i1,e2) if_c, SUM(d1) FROM t GROUP BY e2,i1 ORDER BY nullif_c, SUM(d1);
 DROP TABLE t;
 
--- @bvt:issue#3588
 CREATE TABLE source(bt INTEGER, bf INTEGER, i8u BIGINT UNSIGNED, i8s BIGINT);
 INSERT INTO source VALUES
 (1,0,0,-9223372036854775808), (1,0,18446744073709551615,9223372036854775807);
 SELECT IF(bt,i8u,i8s) AS u, IF(bf,i8u,i8s) AS s
 FROM source;
 DROP TABLE source;
--- @bvt:issue
 
 create table t1 (num  double(12,2));
 insert into t1 values (144.54);
 select sum(if(num is null,0.00,num)) from t1;
 drop table t1;
 
--- @bvt:issue#3588
 select if(1, cast(1111111111111111111 as unsigned), 1) i, case when 1 then cast(1111111111111111111 as unsigned) else 1 end c, coalesce(cast(1111111111111111111 as unsigned), 1) co;
--- @bvt:issue
 
 create table t1 (a bigint unsigned);
 insert into t1 select (if(1, 9223372036854775808, 1));
@@ -62,9 +56,7 @@ DROP TABLE t;
 
 create table t1 (f1 int, f2 int);
 insert into t1 values (0,1),(1,2);
--- @bvt:issue#3588
 select count(distinct if(f1,3,f2)) from t1;
--- @bvt:issue
 drop table t1;
 
 
@@ -132,14 +124,10 @@ DROP TABLE t1;
 
 create table t1 (f1 int, f2 int);
 insert into t1 values(1,1),(0,0);
--- @bvt:issue#3588
 select f1, any_value(f2), if(f1, 40.0, 5.00) from t1 group by f1;
--- @bvt:issue
 drop table t1;
 
--- @bvt:issue#3588
 select if(0, 18446744073709551610, 18446744073709551610);
--- @bvt:issue
 
 CREATE TABLE t1(a DECIMAL(10,3));
 -- @bvt:issue#2302
@@ -154,9 +142,7 @@ DROP TABLE t1;
 
 CREATE TABLE t1 (c varchar(255));
 INSERT INTO t1 VALUES(1), (2), (3), (4), ('12345678901234567890');
--- @bvt:issue#3588
 SELECT * FROM (SELECT MAX(IF(1, CAST(c AS UNSIGNED), 0)) FROM t1) AS te;
--- @bvt:issue
 DROP TABLE t1;
 
 
@@ -167,12 +153,10 @@ SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c;
 DROP TABLE t1;
 -- @bvt:issue
 
--- @bvt:issue#3588
 SELECT if(0, (SELECT min('hello')), NULL);
 SELECT if(1, (SELECT min('hello')), NULL);
 SELECT if(0, NULL, (SELECT min('hello')));
 SELECT if(1, NULL, (SELECT min('hello')));
--- @bvt:issue
 
 CREATE TABLE t1(c1 INT);
 INSERT INTO t1 VALUES(1);
diff --git a/test/cases/function/func_math_abs.test b/test/cases/function/func_math_abs.test
index 3259cda544c7769d4d13409f7083f19a5fe8a25b..15f29b22de0544e485ef47f755dd2fc97c4a11c4 100644
--- a/test/cases/function/func_math_abs.test
+++ b/test/cases/function/func_math_abs.test
@@ -7,22 +7,18 @@ select abs(1e10);
 select abs(NULL);
 
 #EXTREME VALUE
--- @bvt:issue#3588
 select abs(9999999999999999999999);
 select abs(-9999999999999999999999);
--- @bvt:issue
 select abs(10/0);
 
 #宓屽
 select abs(cast(-2 as unsigned)), abs(18446744073709551614), abs(-2);
 
 #WHERE, 鏁版嵁绫诲瀷
--- @bvt:issue#3588
 CREATE TABLE t(u TINYINT UNSIGNED NOT NULL);
 INSERT INTO t VALUES (0), (3), (255);
 SELECT * FROM t WHERE ABS(u=256)=0;
 DROP TABLE t;
--- @bvt:issue
 
 #DISTINCT
 create table t1(a int, b int, c int);
diff --git a/test/cases/function/func_math_ceil.test b/test/cases/function/func_math_ceil.test
index 92badaf76f1ffa7ab34a94ca87a9ca9b331ae022..034476414db825c3b844d3cad67e23829a010f81 100644
--- a/test/cases/function/func_math_ceil.test
+++ b/test/cases/function/func_math_ceil.test
@@ -20,7 +20,6 @@ drop table t;
 
 
 #SELECT, 宓屽锛孌ATATYPE锛� EXTREME VALUE
--- @bvt:issue#3588
 create table t(a decimal(19,0));
 insert into t select (CEILING(CAST(1844674407370955161 AS DECIMAL(19, 0))));
 insert into t select (FLOOR(CAST(1844674407370955161 AS DECIMAL(19, 0))));
@@ -41,7 +40,6 @@ insert into t select (CEILING(CAST(-922337203685477580 AS DECIMAL(18, 0))));
 insert into t select (FLOOR(CAST(-922337203685477580 AS DECIMAL(18, 0))));
 SELECT * FROM t;
 DROP TABLE t;
--- @bvt:issue
 #0.5MO涓嶆敮鎸丆REATE SELECT
 #CREATE TABLE t AS
 #SELECT CEILING(CAST(99999999999999999.9 AS DECIMAL(18, 1))) AS c,
diff --git a/test/cases/function/func_math_floor.test b/test/cases/function/func_math_floor.test
index b1613d7c01d21bb2e7f0267fcae0229f8f842932..1148e5c5a6719c9d20c29b64735d03ff35d5751b 100644
--- a/test/cases/function/func_math_floor.test
+++ b/test/cases/function/func_math_floor.test
@@ -125,9 +125,7 @@ DROP TABLE t1;
 #DROP TABLE t1;
 
 #宓屽
--- @bvt:issue#3588
 SELECT DATE(FLOOR(20110512154559.616));
--- @bvt:issue
 
 #INSERT INTO, distinct
 CREATE table t1(a int, b float);
diff --git a/test/cases/function/func_math_ln.test b/test/cases/function/func_math_ln.test
index 35ff00ae1dadb32ffb12f2b64d3b29084db1a9fa..f0ac5baa9b4a70a796bcbeaf67850fe6b6ea808e 100644
--- a/test/cases/function/func_math_ln.test
+++ b/test/cases/function/func_math_ln.test
@@ -26,12 +26,10 @@ SELECT * FROM t1 ORDER BY a;
 drop table t1;
 
 #DATATYPE
--- @bvt:issue#3588
 create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19));
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314);
 select ln(a),ln(b),ln(c),ln(d),ln(e),ln(f),ln(g),ln(h) from t1;
 drop table t1;
--- @bvt:issue
 
 #绠楁湳鎿嶄綔
 select ln(123.54-123.03);
diff --git a/test/cases/function/func_math_log.test b/test/cases/function/func_math_log.test
index 3429253ab8ac49dcab4a20a61206435f2e404743..a0683d62db3e5089dc3c86cd00c6c8a1470d116f 100644
--- a/test/cases/function/func_math_log.test
+++ b/test/cases/function/func_math_log.test
@@ -1,7 +1,5 @@
 #SELECT, 宓屽
--- @bvt:issue#3588
 select log(exp(10)),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
--- @bvt:issue
 
 #0.5 sqrt鍑芥暟鏆備笉鏀寔
 #select exp(log(sqrt(10))*2);
@@ -52,9 +50,7 @@ drop table t1;
 
 create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19), i DATE, k datetime, l TIMESTAMP, m char(255), n varchar(255));
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
--- @bvt:issue#3588
 select log(a),log(b),log(c),log(d),log(e),log(f),log(g),log(h),log(i),log(k),log(l),log(m),log(n) from t1;
--- @bvt:issue
 -- @bvt:issue#3608
 select log(a,b), log(b,c),log(c,d),log(d,e),log(e,f),log(f,g),log(g,h), log(h,i), log(i,k),log(k,l),log(l,m),log(m,n) from t1;
 -- @bvt:issue
diff --git a/test/cases/function/func_math_power.test b/test/cases/function/func_math_power.test
index 0e050d4e4f0bc678e5bde3704b5ab3974ff0b828..99a00540ab261ba6a65933ba35dc0ad6520c83c2 100644
--- a/test/cases/function/func_math_power.test
+++ b/test/cases/function/func_math_power.test
@@ -30,12 +30,10 @@ SELECT * FROM t1 ORDER BY a;
 drop table t1;
 
 #DATATYPE
--- @bvt:issue#3588
 create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19));
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314);
 select power(a,b),power(b,c),power(c,d),power(d,e),power(e,f),power(f,g),power(g,h) from t1;
 drop table t1;
--- @bvt:issue
 
 #绠楁湳鎿嶄綔
 select power(123.54-123.03, 12-34);
diff --git a/test/cases/function/func_math_sinh.test b/test/cases/function/func_math_sinh.test
index 1146235d3ad47aa5cb7cfbcb40982dbb3b766fe2..960236ceb2d83cb302071d8275c3926c7d0d503d 100644
--- a/test/cases/function/func_math_sinh.test
+++ b/test/cases/function/func_math_sinh.test
@@ -32,7 +32,6 @@ SELECT SINH(NULL);
 
 
 #DATA TYPE
--- @bvt:issue#3588
 create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19), i DATE, k datetime, l TIMESTAMP, m char(255), n varchar(255));
 insert into t1 values(1, 1, 2, 43, 5, 35.5, 31.133, 14.314, "2012-03-10", "2012-03-12 10:03:12", "2022-03-12 13:03:12", "ab23c", "d5cf");
 insert into t1 values(71, 1, 2, 34, 5, 5.5, 341.13, 15.314, "2012-03-22", "2013-03-12 10:03:12", "2032-03-12 13:04:12", "abr23c", "3dcf");
@@ -40,7 +39,6 @@ insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
 select SINH(a), SINH(b), SINH(c), SINH(d), SINH(e), SINH(f), SINH(g), SINH(h), SINH(i), SINH(j), SINH(k), SINH(l) from t1;
 drop table t1;
--- @bvt:issue
 
 
 #0.5鏆備笉鏀寔time绫诲瀷
diff --git a/test/cases/function/func_math_trig.test b/test/cases/function/func_math_trig.test
index fbea715178de8a3da9d416b9b2f1d0749a5e1358..19aff331a9737608e2f1c8f927b8a87cda2b4fb0 100644
--- a/test/cases/function/func_math_trig.test
+++ b/test/cases/function/func_math_trig.test
@@ -109,12 +109,10 @@ select sin(e), cos(e), tan(e),cot(e),acos(e),atan(e) from t1;
 select sin(f), cos(f), tan(f),cot(f),acos(f),atan(f) from t1;
 select sin(g), cos(g), tan(g),cot(g),acos(g),atan(g) from t1;
 
--- @bvt:issue#3588
 select sin(h), cos(h), tan(h),cot(h),acos(h),atan(h) from t1;
 select sin(i), cos(i), tan(i),cot(i),acos(i),atan(i) from t1;
 select sin(k), cos(k), tan(k),cot(k),acos(k),atan(k) from t1;
 select sin(l), cos(l), tan(l),cot(l),acos(l),atan(l) from t1;
--- @bvt:issue
 #select asin(a), asin(b), asin(c), asin(d), asin(e), asin(f), asin(g), asin(h), asin(i), asin(j), asin(k), asin(l) from t1;
 #select atan2(a,a), atan2(b,b),atan2(c,c),atan2(d,d),atan2(e,e),atan2(f,f),atan2(g,g),atan2(h,h),atan2(i,i),atan2(j,j),atan2(k,k),atan2(l,l) from t1;
 drop table t1;
diff --git a/test/cases/function/func_string_lpad_rpad.test b/test/cases/function/func_string_lpad_rpad.test
index 3e05ac8cddd137bd8aa10f26ef61bfd60defebca..162d39c925a4bd8fc7c3648954579b717c4bf441 100644
--- a/test/cases/function/func_string_lpad_rpad.test
+++ b/test/cases/function/func_string_lpad_rpad.test
@@ -88,10 +88,7 @@ SELECT ((+0) IN
 ((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
 (32767.1)));
 
-
--- @bvt:issue#3588
 SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
--- @bvt:issue
 
 
 #涓枃
diff --git a/test/cases/function/func_string_oct.test b/test/cases/function/func_string_oct.test
index 3b108af0aef08cfa3ca8698730cbe287b62b6c71..820836457b9396d0eb434ad4b030b02dc1d8217c 100644
--- a/test/cases/function/func_string_oct.test
+++ b/test/cases/function/func_string_oct.test
@@ -38,9 +38,7 @@ insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
--- @bvt:issue#3588
 select oct(a),oct(b),oct(c),oct(d),oct(e),oct(f),oct(g),oct(h),oct(i),oct(k),oct(l),oct(m),oct(n) from t1;
--- @bvt:issue
 drop table t1;
 
 
diff --git a/test/cases/prepare/prepare_all.sql b/test/cases/prepare/prepare_all.sql
index a137e11da3658082b7a1b9c2de1f280454c53822..619d4c19c4320d5cb81a21a5e9f752cfe09212b3 100644
--- a/test/cases/prepare/prepare_all.sql
+++ b/test/cases/prepare/prepare_all.sql
@@ -35,9 +35,7 @@ DEALLOCATE PREPARE s1;
 
 PREPARE s2 FROM 'SELECT * FROM numbers WHERE si=?';
 EXECUTE s2 USING @ui_min;
--- @bvt:issue#3588
 EXECUTE s2 USING @ui_max;
--- @bvt:issue
 EXECUTE s2 USING @si_min;
 EXECUTE s2 USING @si_max;
 
@@ -492,9 +490,7 @@ DEALLOCATE PREPARE s;
 
 PREPARE s FROM 'SELECT 0 + ?';
 
--- @bvt:issue#3588
 EXECUTE s USING @maxint;
--- @bvt:issue
 DEALLOCATE PREPARE s;
 
 PREPARE s FROM 'SELECT concat(?,"")';
diff --git a/test/result/dtype/date.result b/test/result/dtype/date.result
index d04a9f618784a53d50692484c2f8a22d4826877f..20dfa9f2a9f98cf6b133e1fb67862f613281c443 100644
--- a/test/result/dtype/date.result
+++ b/test/result/dtype/date.result
@@ -189,7 +189,7 @@ SELECT CAST(0 AS date) BETWEEN 0 AND -1;
 CAST(0 AS date) BETWEEN 0 AND -1
 NULL
 SELECT CAST(10000101 as date) BETWEEN '1000-01-01' and '1000-01-02';
-Operator 'cast' with parameters [BIGINT DATE] will be implemented in future version.
+Operator 'cast' with parameters [BIGINT DATE] is not supported.
 drop table if exists t1;
 drop table if exists t2;
 drop table if exists t3;
diff --git a/test/result/expression/temporal_interval.result b/test/result/expression/temporal_interval.result
index 2f33fee1daf11949866228e24605224a433d794d..044875bd7f999c21fbe07f68bcc922c2502ce5b5 100755
--- a/test/result/expression/temporal_interval.result
+++ b/test/result/expression/temporal_interval.result
@@ -406,9 +406,9 @@ select date("1997-12-31 23:59:59" + INTERVAL 1 SECOND) + INTERVAL "1:1:1" HOUR_S
 date("1997-12-31 23:59:59" + INTERVAL 1 SECOND) + INTERVAL "1:1:1" HOUR_SECOND
 1998-01-01 01:01:01
 SELECT CAST(CAST('2006-08-10 10:11:12' AS DATETIME) AS DECIMAL(20,6));
-Operator 'cast' with parameters [DATETIME DECIMAL128] will be implemented in future version.
+Operator 'cast' with parameters [DATETIME DECIMAL128] is not supported.
 SELECT CAST(CAST('2006-08-10 10:11:12' AS DATETIME) + INTERVAL 14 MICROSECOND AS DECIMAL(20,6));
-Operator 'cast' with parameters [DATETIME DECIMAL128] will be implemented in future version.
+Operator 'cast' with parameters [DATETIME DECIMAL128] is not supported.
 drop table if exists t1;
 drop table if exists t2;
 create table t1(i int,a datetime,b datetime,c datetime,d char(20),e varchar(50));
diff --git a/test/result/function/func_aggr_bitwise.result b/test/result/function/func_aggr_bitwise.result
index 857ed3568ce405a7fd5f8ac6eb6af07edac2bf9d..67b79a60f4ca6cd88a9665a601ede4fbe992573a 100644
--- a/test/result/function/func_aggr_bitwise.result
+++ b/test/result/function/func_aggr_bitwise.result
@@ -66,14 +66,11 @@ select bit_and(h) from t1;
 bit_and(h)
 12
 select bit_and(i) from t1;
-bit_and(i)
-20054528
+Aggregate function of 'bit_and' do not support implicit conversions for param of [DATE]
 select bit_and(k) from t1;
-bit_and(k)
-20068234691032
+Aggregate function of 'bit_and' do not support implicit conversions for param of [DATETIME]
 select bit_and(l) from t1;
-bit_and(l)
-19791209300744
+Aggregate function of 'bit_and' do not support implicit conversions for param of [TIMESTAMP]
 select bit_and(m) from t1;
 bit_and(m)
 0
@@ -111,14 +108,11 @@ select bit_or(h) from t1;
 bit_or(h)
 127
 select bit_or(i) from t1;
-bit_or(i)
-20175870
+Aggregate function of 'bit_or' do not support implicit conversions for param of [DATE]
 select bit_or(k) from t1;
-bit_or(k)
-20203467439576
+Aggregate function of 'bit_or' do not support implicit conversions for param of [DATETIME]
 select bit_or(l) from t1;
-bit_or(l)
-20340965113708
+Aggregate function of 'bit_or' do not support implicit conversions for param of [TIMESTAMP]
 select bit_or(m) from t1;
 bit_or(m)
 3
@@ -156,14 +150,11 @@ select bit_xor(h) from t1;
 bit_xor(h)
 115
 select bit_xor(i) from t1;
-bit_xor(i)
-120876
+Aggregate function of 'bit_xor' do not support implicit conversions for param of [DATE]
 select bit_xor(k) from t1;
-bit_xor(k)
-56443059200
+Aggregate function of 'bit_xor' do not support implicit conversions for param of [DATETIME]
 select bit_xor(l) from t1;
-bit_xor(l)
-427281392740
+Aggregate function of 'bit_xor' do not support implicit conversions for param of [TIMESTAMP]
 select bit_xor(m) from t1;
 bit_xor(m)
 3
@@ -172,7 +163,8 @@ bit_xor(n)
 3
 drop table t1;
 select BIT_AND(99999999999999999.99999), BIT_OR(99999999999999999.99999), BIT_XOR(99999999999999999.99999);
-Function 'bit_and' with parameters [DECIMAL128] will be implemented in future version.
+bit_and(99999999999999999.99999)	bit_or(99999999999999999.99999)	bit_xor(99999999999999999.99999)
+100000000000000000	100000000000000000	100000000000000000
 select BIT_AND(999999999999999933193939.99999),BIT_OR(999999999999999933193939.99999),BIT_XOR(999999999999999933193939.99999);
 bit_and(999999999999999933193939.99999)	bit_or(999999999999999933193939.99999)	bit_xor(999999999999999933193939.99999)
 18446744073709551615	18446744073709551615	18446744073709551615
diff --git a/test/result/function/func_cast.result b/test/result/function/func_cast.result
index 9ec505f94ba852c259e40c6e77dc89faca221122..a7291598f7d0eef546ce10848223267f366b14d0 100644
--- a/test/result/function/func_cast.result
+++ b/test/result/function/func_cast.result
@@ -152,11 +152,11 @@ SELECT CAST(1/3 AS FLOAT) as float_col,CAST(1/3 AS DOUBLE) as double_col, CAST(1
 float_col	double_col	real_col
 0.333333	0.333333333	0.333333333
 SELECT CAST(DATE'2000-01-01' AS FLOAT), CAST(DATE'2000-01-01' AS DOUBLE);
-Operator 'cast' with parameters [DATE FLOAT] will be implemented in future version.
+Operator 'cast' with parameters [DATE FLOAT] is not supported.
 SELECT CAST(TIMESTAMP'2000-01-01 23:59:59' AS FLOAT), CAST(TIMESTAMP'2000-01-01 23:59:59' AS DOUBLE);
-Operator 'cast' with parameters [TIMESTAMP FLOAT] will be implemented in future version.
+Operator 'cast' with parameters [TIMESTAMP FLOAT] is not supported.
 SELECT CAST(TIMESTAMP'2000-01-01 23:59:59.123456' AS FLOAT), CAST(TIMESTAMP'2000-01-01 23:59:59.123456' AS DOUBLE);
-Operator 'cast' with parameters [TIMESTAMP FLOAT] will be implemented in future version.
+Operator 'cast' with parameters [TIMESTAMP FLOAT] is not supported.
 SELECT CAST(NULL AS REAL), CAST(NULL AS FLOAT), CAST(NULL AS DOUBLE);
 CAST(NULL AS REAL)	CAST(NULL AS FLOAT)	CAST(NULL AS DOUBLE)
 null	null	null
@@ -193,7 +193,7 @@ create table t1(f1 date, f2 timestamp, f3 datetime);
 insert into t1 values ("2006-01-01", "2006-01-01 12:01:01", "2006-01-01 12:01:01");
 insert into t1 values ("2006-01-02", "2006-01-02 12:01:02", "2006-01-02 12:01:02");
 select f1 from t1 where f1 between CAST("2006-1-1" as date) and CAST(20060101 as date);
-Operator 'cast' with parameters [BIGINT DATE] will be implemented in future version.
+Operator 'cast' with parameters [BIGINT DATE] is not supported.
 select f1 from t1 where f1 between cast("2006-1-1" as date) and cast("2006.1.1" as date);
 f1
 2006-01-01
diff --git a/test/result/function/func_coalesce.result b/test/result/function/func_coalesce.result
index 5da901152aaa46cafbcab0f093f99e1d3149e9f4..15e175f927490fed28b10c5a0299b80e2f78d7a6 100644
--- a/test/result/function/func_coalesce.result
+++ b/test/result/function/func_coalesce.result
@@ -187,14 +187,12 @@ DROP TABLE t1;
 CREATE TABLE t1 (a DATE);
 INSERT INTO t1 VALUES ('2000-01-01');
 SELECT CAST(COALESCE(a,a) AS SIGNED) FROM t1;
-CAST(COALESCE(a,a) AS SIGNED)
-20000101
+Operator 'cast' with parameters [DATE BIGINT] is not supported.
 SELECT CAST(COALESCE(a,a) AS CHAR) FROM t1;
 CAST(COALESCE(a,a) AS CHAR)
 2000-01-01
 SELECT CAST(COALESCE(a,a) AS DECIMAL(25,3)) FROM t1;
-CAST(COALESCE(a,a) AS DECIMAL(25,3))
-20000101.000
+Operator 'cast' with parameters [DATE DECIMAL128] is not supported.
 SELECT CAST(COALESCE(a,a) AS DATETIME(6)) FROM t1;
 CAST(COALESCE(a,a) AS DATETIME(6))
 2000-01-01 00:00:00
@@ -202,20 +200,17 @@ SELECT CAST(COALESCE(a,a) AS TIME(6)) FROM t1;
 CAST(COALESCE(a,a) AS TIME(6))
 00:00:00
 SELECT ROUND(COALESCE(a,a)) FROM t1;
-ROUND(COALESCE(a,a))
-2.0000101E7
+Function 'round' with parameters [DATE] is not supported.
 DROP TABLE t1;
 CREATE TABLE t1 (a DATETIME);
 INSERT INTO t1 VALUES ('2000-01-01 00:00:00');
 SELECT CAST(COALESCE(a,a) AS SIGNED) FROM t1;
-CAST(COALESCE(a,a) AS SIGNED)
-20000101000000
+Operator 'cast' with parameters [DATETIME BIGINT] is not supported.
 SELECT CAST(COALESCE(a,a) AS CHAR) FROM t1;
 CAST(COALESCE(a,a) AS CHAR)
 2000-01-01 00:00:00
 SELECT CAST(COALESCE(a,a) AS DECIMAL(25,3)) FROM t1;
-CAST(COALESCE(a,a) AS DECIMAL(25,3))
-20000101000000.000
+Operator 'cast' with parameters [DATETIME DECIMAL128] is not supported.
 SELECT CAST(COALESCE(a,a) AS DATETIME(6)) FROM t1;
 CAST(COALESCE(a,a) AS DATETIME(6))
 2000-01-01 00:00:00
@@ -223,8 +218,7 @@ SELECT CAST(COALESCE(a,a) AS TIME(6)) FROM t1;
 CAST(COALESCE(a,a) AS TIME(6))
 00:00:00
 SELECT ROUND(COALESCE(a,a)) FROM t1;
-ROUND(COALESCE(a,a))
-2.0000101E13
+Function 'round' with parameters [DATETIME] is not supported.
 DROP TABLE t1;
 select coalesce(null);
 coalesce(null)
diff --git a/test/result/function/func_datetime_date.result b/test/result/function/func_datetime_date.result
index 0a6741e2017230790d75d6e02758ab969d92c374..e5a27b7b2f88e84da7a184e30f37d208b9470ff2 100644
--- a/test/result/function/func_datetime_date.result
+++ b/test/result/function/func_datetime_date.result
@@ -1,11 +1,9 @@
 SELECT DATE(0.0124);
-DATE(0.0124)
-null
+Operator 'cast' with parameters [DECIMAL128 DATE] is not supported.
 SELECT DATE("2112123");
 Incorrect date format
 SELECT DATE(1231241.4513);
-DATE(1231241.4513)
-null
+Operator 'cast' with parameters [DECIMAL128 DATE] is not supported.
 SELECT DATE("2017-06-15");
 DATE("2017-06-15")
 2017-06-15
@@ -27,19 +25,13 @@ CREATE TABLE t1 (d1 datetime);
 INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
 ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00');
 SELECT cast(date(d1) as signed) FROM t1;
-cast(date(d1) as signed)
-20070719
-null
-20070719
-null
-20070719
+Operator 'cast' with parameters [DATE BIGINT] is not supported.
 drop table t1;
 CREATE TABLE t1 (d1 datetime);
 INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL),
 ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00');
 SELECT sum(date(d1)) FROM t1;
-sum(date(d1))
-60212157
+Aggregate function of 'sum' do not support implicit conversions for param of [DATE]
 drop table t1;
 select date("1997-12-31 23:59:59.000001");
 date("1997-12-31 23:59:59.000001")
@@ -47,8 +39,7 @@ date("1997-12-31 23:59:59.000001")
 select date("1997-13-31 23:59:59.000001");
 Incorrect date format
 SELECT DATE(20110512154559.6 + 0e0);
-DATE(20110512154559.6 + 0e0)
-2011-05-12
+Operator 'cast' with parameters [DOUBLE DATE] is not supported.
 SELECT DATE(concat_ws('a', 0));
 Incorrect date format
 CREATE TABLE t1 (a timestamp);
@@ -68,8 +59,7 @@ dt	exp
 2013-10-13 00:00:00	false
 DROP TABLE t1;
 SELECT DATE(20110512154559.616), DATE(FLOOR(20110512154559.616));
-DATE(20110512154559.616)	DATE(FLOOR(20110512154559.616))
-2011-05-12	2011-05-12
+Operator 'cast' with parameters [DECIMAL128 DATE] is not supported.
 DROP TABLE IF EXISTS t3;
 CREATE TABLE t3(c1 DATE NOT NULL);
 INSERT INTO t3 VALUES('2000-01-01');
diff --git a/test/result/function/func_datetime_date_add.result b/test/result/function/func_datetime_date_add.result
index 9a2dc1e6cbb1393245da1755b7678820123cffb0..71a2c7c74619a3f4629d3522864c83dd44a74f08 100644
--- a/test/result/function/func_datetime_date_add.result
+++ b/test/result/function/func_datetime_date_add.result
@@ -340,8 +340,7 @@ OCT(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
 OCT(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field1_str2,
 OCT(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
 OCT(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
-field_str1	field1_str2	field_date	field_datetime
-3727	3727	3727	3727
+Function 'oct' with parameters [DATETIME] is not supported.
 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1 1:1:1.000002" DAY_MICROSECOND);
 date_sub("1998-01-01 00:00:00.000001",INTERVAL "1 1:1:1.000002" DAY_MICROSECOND)
 1997-12-30 22:58:58.999999000
diff --git a/test/result/function/func_datetime_dayofyear.result b/test/result/function/func_datetime_dayofyear.result
index 82211d53ea9cdcb05fa076abdc122c309f52fe4f..1e929c44114b38dc8d31ed6e817bcc53c1aa1d28 100644
--- a/test/result/function/func_datetime_dayofyear.result
+++ b/test/result/function/func_datetime_dayofyear.result
@@ -10,23 +10,23 @@ insert into t1 values(71, 1, 2, 34, 5, 5.5, 341.13, 15.314, "2012-03-22", "2013-
 insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015-03-12 10:03:12", "2002-03-12 13:03:12", "afbc", "dct5f");
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
 select dayofyear(a),dayofyear(b),dayofyear(c),dayofyear(d),dayofyear(e),dayofyear(f) from t1;
-[42883]unsupported parameter types [TINYINT] for function 'dayofyear'
+Function 'dayofyear' with parameters [TINYINT] is not supported.
 select dayofyear(g),dayofyear(h),dayofyear(i),dayofyear(k),dayofyear(l),dayofyear(m),dayofyear(n) from t1;
-[42883]unsupported parameter types [DOUBLE] for function 'dayofyear'
+Function 'dayofyear' with parameters [DOUBLE] is not supported.
 drop table t1;
 SELECT dayofyear("2015-09-03") as dayofyear;
 dayofyear
 246
 SELECT dayofyear(20150904) as dayofyear;
-[42883]unsupported parameter types [BIGINT] for function 'dayofyear'
+Function 'dayofyear' with parameters [BIGINT] is not supported.
 SELECT dayofyear(1340124) as dayofyear;
-[42883]unsupported parameter types [BIGINT] for function 'dayofyear'
+Function 'dayofyear' with parameters [BIGINT] is not supported.
 SELECT dayofyear(0.45133) as dayofyear;
-[42883]unsupported parameter types [DOUBLE] for function 'dayofyear'
+Function 'dayofyear' with parameters [DECIMAL128] is not supported.
 SELECT dayofyear(10) as dayofyear;
-[42883]unsupported parameter types [BIGINT] for function 'dayofyear'
+Function 'dayofyear' with parameters [BIGINT] is not supported.
 SELECT dayofyear(1=1) as dayofyear;
-[42883]unsupported parameter types [BOOL] for function 'dayofyear'
+Function 'dayofyear' with parameters [BOOL] is not supported.
 SELECT dayofyear('2015-09.30') as dayofyear;
 dayofyear
 273
diff --git a/test/result/function/func_datetime_unixtime.result b/test/result/function/func_datetime_unixtime.result
index 01da5c73016d5a7c8a875b6df966ee967efe6054..b6f54519937968923da503e6a1ac92b510b647ae 100644
--- a/test/result/function/func_datetime_unixtime.result
+++ b/test/result/function/func_datetime_unixtime.result
@@ -69,18 +69,18 @@ INSERT INTO t1 VALUES
 (32536771199.9999998),
 (32536771199.9999999);
 SELECT a, FROM_UNIXTIME(a) FROM t1;
-a	FROM_UNIXTIME(a)
-32536771199.9999990	3001-01-19 07:59:59.999999000
-32536771199.9999990	3001-01-19 07:59:59.999999000
-32536771199.9999991	3001-01-19 07:59:59.999999000
-32536771199.9999992	3001-01-19 07:59:59.999999000
-32536771199.9999993	3001-01-19 07:59:59.999999000
-32536771199.9999994	3001-01-19 07:59:59.999999000
-32536771199.9999995	null
-32536771199.9999996	null
-32536771199.9999997	null
-32536771199.9999998	null
-32536771199.9999999	null
+a    from_unixtime(a)
+32536771199.9999990    null
+32536771199.9999990    null
+32536771199.9999991    null
+32536771199.9999992    null
+32536771199.9999993    null
+32536771199.9999994    null
+32536771199.9999995    null
+32536771199.9999996    null
+32536771199.9999997    null
+32536771199.9999998    null
+32536771199.9999999    null
 DROP TABLE t1;
 SET time_zone='+00:00';
 SELECT
@@ -167,5 +167,4 @@ SELECT FROM_UNIXTIME(9223372036854775808);
 FROM_UNIXTIME(9223372036854775808)
 null
 SELECT FROM_UNIXTIME(99999999999999999999999999999999999999999999999999999999999999999);
-FROM_UNIXTIME(99999999999999999999999999999999999999999999999999999999999999999)
-null
+decimal128 data truncated
diff --git a/test/result/function/func_datetime_weekday.result b/test/result/function/func_datetime_weekday.result
index d4392dfbf4691b6c229bc2bbe344ae7a7569c94f..df91b50c80be57a6a6bcbab58b4e1b54085b2a73 100644
--- a/test/result/function/func_datetime_weekday.result
+++ b/test/result/function/func_datetime_weekday.result
@@ -10,36 +10,24 @@ insert into t1 values(71, 1, 2, 34, 5, 5.5, 341.13, 15.314, "2012-03-22", "2013-
 insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015-03-12 10:03:12", "2002-03-12 13:03:12", "afbc", "dct5f");
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
 select weekday(a),weekday(b),weekday(c),weekday(d),weekday(e),weekday(f) from t1;
-weekday(a)	weekday(b)	weekday(c)	weekday(d)	weekday(e)	weekday(f)
-null	null	null	null	null	null
-null	null	null	null	null	null
-null	null	null	null	null	null
-null	null	null	null	null	null
+Function 'weekday' with parameters [TINYINT] is not supported.
 select weekday(g),weekday(h),weekday(i),weekday(k),weekday(l),weekday(m),weekday(n) from t1;
-weekday(g)	weekday(h)	weekday(i)	weekday(k)	weekday(l)	weekday(m)	weekday(n)
-null	null	5	0	5	null	null
-null	null	3	1	4	null	null
-null	null	5	3	1	null	null
-null	0	3	1	1	null	null
+Function 'weekday' with parameters [DOUBLE] is not supported.
 drop table t1;
 SELECT weekday("2015-09-03") as weekday;
 weekday
 3
-SELECT weekday(20150904) as weekday;
+SELECT weekday('20150904') as weekday;
 weekday
 4
 SELECT weekday(1340124) as weekday;
-weekday
-null
+Function 'weekday' with parameters [BIGINT] is not supported.
 SELECT weekday(0.45133) as weekday;
-weekday
-null
+Function 'weekday' with parameters [DECIMAL128] is not supported.
 SELECT weekday(10) as weekday;
-weekday
-null
+Function 'weekday' with parameters [BIGINT] is not supported.
 SELECT weekday(1=1) as weekday;
-weekday
-null
+Function 'weekday' with parameters [BOOL] is not supported.
 SELECT weekday('2015-09.30') as weekday;
 weekday
 2
diff --git a/test/result/function/func_if.result b/test/result/function/func_if.result
index 7d981e158fd9b38b4681d15385c6d5c04ca34473..233d0414ff8f0fb510f33ed294dadf37343bec82 100644
--- a/test/result/function/func_if.result
+++ b/test/result/function/func_if.result
@@ -32,9 +32,7 @@ INSERT INTO source VALUES
 (1,0,0,-9223372036854775808), (1,0,18446744073709551615,9223372036854775807);
 SELECT IF(bt,i8u,i8s) AS u, IF(bf,i8u,i8s) AS s
 FROM source;
-u	s
-0	-9223372036854775808
-18446744073709551615	9223372036854775807
+Can't cast column from BIGINT UNSIGNED type to BIGINT type because of one or more values in that column. Reason: overflow
 DROP TABLE source;
 create table t1 (num  double(12,2));
 insert into t1 values (144.54);
@@ -99,8 +97,7 @@ a
 2
 DROP TABLE t1;
 select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0 ;
-IF(0,"ERROR","this")	IF(1,"is","ERROR")	IF(NULL,"ERROR","a")	IF(1,2,3)|0	IF(1,2.0,3.0)+0
-this	is	a	2	2.0
+Function 'if' with parameters [ANY VARCHAR VARCHAR] is not supported.
 CREATE TABLE t1 (st varchar(255) NOT NULL, u int(11) NOT NULL);
 INSERT INTO t1 VALUES ('a',1),('A',1),('aa',1),('AA',1),('a',1),('aaa',0),('BBB',0);
 select if(1,st,st) s from t1 order by s;
@@ -188,8 +185,7 @@ DROP TABLE t1;
 CREATE TABLE t1 (c varchar(255));
 INSERT INTO t1 VALUES(1), (2), (3), (4), ('12345678901234567890');
 SELECT * FROM (SELECT MAX(IF(1, CAST(c AS UNSIGNED), 0)) FROM t1) AS te;
-MAX(IF(1, CAST(c AS UNSIGNED), 0))
-12345678901234567890
+Can't cast column from BIGINT UNSIGNED type to BIGINT type because of one or more values in that column. Reason: overflow
 DROP TABLE t1;
 CREATE TABLE t1 (a int, b DOUBLE);
 INSERT INTO t1 VALUES (NULL, 0), (NULL, 1);
diff --git a/test/result/function/func_math_abs.result b/test/result/function/func_math_abs.result
index f1e99ebe2c1b1d32a14dcbb35bf79735f7f93ff9..cf69c116ec4ec1afd2560699fba1d735af69a58e 100644
--- a/test/result/function/func_math_abs.result
+++ b/test/result/function/func_math_abs.result
@@ -23,10 +23,7 @@ Can't cast '-2' from BIGINT type to BIGINT UNSIGNED type. Reason: overflow
 CREATE TABLE t(u TINYINT UNSIGNED NOT NULL);
 INSERT INTO t VALUES (0), (3), (255);
 SELECT * FROM t WHERE ABS(u=256)=0;
-u
-0
-3
-255
+Function 'abs' with parameters [BOOL] is not supported.
 DROP TABLE t;
 create table t1(a int, b int, c int);
 insert into t1 values(100,1,2),(200,1,1),(300,2,1),(400,2,2);
diff --git a/test/result/function/func_math_floor.result b/test/result/function/func_math_floor.result
index 7e71e6f748e4063b8b209f1ce344cd5f3a816dee..ea2be9fd2c20dcf56a2b700c36011969b8266db7 100644
--- a/test/result/function/func_math_floor.result
+++ b/test/result/function/func_math_floor.result
@@ -79,8 +79,7 @@ FROM t1 ORDER BY a LIMIT 5;
 a	a
 DROP TABLE t1;
 SELECT DATE(FLOOR(20110512154559.616));
-DATE(FLOOR(20110512154559.616))
-2011-05-12
+Operator 'cast' with parameters [DECIMAL128 DATE] is not supported.
 CREATE table t1(a int, b float);
 insert into t1 select floor(12124.413), floor(-4213.413);
 insert into t1 select floor(12124.123), floor(-42413.409);
diff --git a/test/result/function/func_math_log.result b/test/result/function/func_math_log.result
index 144a2df632e87a17191f3fb36a9b4a4130daae79..8104ced4f897d65226b4cd416a07be69d52f7265 100644
--- a/test/result/function/func_math_log.result
+++ b/test/result/function/func_math_log.result
@@ -1,6 +1,5 @@
 select log(exp(10)),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
-log(exp(10))	log(-1)	log(NULL)	log(1,1)	log(3,9)	log(-1,2)	log(NULL,2)
-10.0	null	null	null	2.0	null	null
+Logarithm function base cannot be 1
 SELECT LOG(2);
 LOG(2)
 0.6931471805599453
@@ -56,8 +55,7 @@ drop table t1;
 create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19), i DATE, k datetime, l TIMESTAMP, m char(255), n varchar(255));
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
 select log(a),log(b),log(c),log(d),log(e),log(f),log(g),log(h),log(i),log(k),log(l),log(m),log(n) from t1;
-log(a)	log(b)	log(c)	log(d)	log(e)	log(f)	log(g)	log(h)	log(i)	log(k)	log(l)	log(m)	log(n)
-0.0	0.0	0.6931471805599453	1.3862943611198906	1.6094379124341003	1.7047480922384253	3.4381719844535166	2.661238079316406	16.817240410033833	30.632750972983715	30.632750974474746	null	null
+Function 'log' with parameters [DATE] is not supported.
 select log(a,b), log(b,c),log(c,d),log(d,e),log(e,f),log(f,g),log(g,h), log(h,i), log(i,k),log(k,l),log(l,m),log(m,n) from t1;
 log(a,b)	log(b,c)	log(c,d)	log(d,e)	log(e,f)	log(f,g)	log(g,h)	log(h,i)	log(i,k)	log(k,l)	log(l,m)	log(m,n)
 null	null	2.0	1.160964047443681	1.059219544331585	2.0168211362765116	0.7740270385977794	6.319329540915667	1.8215087746921308	1.0000000000486744	null	null
diff --git a/test/result/function/func_math_sinh.result b/test/result/function/func_math_sinh.result
index 722fa7799c65fcbfcce06d34bed653f1d24afe18..b61a9cd83b85d97d3f8672937f0b0e38e9230338 100644
--- a/test/result/function/func_math_sinh.result
+++ b/test/result/function/func_math_sinh.result
@@ -61,6 +61,7 @@ insert into t1 values(71, 1, 2, 34, 5, 5.5, 341.13, 15.314, "2012-03-22", "2013-
 insert into t1 values(1, 1, 21, 4, 54, 53.5, 431.13, 14.394, "2011-03-12", "2015-03-12 10:03:12", "2002-03-12 13:03:12", "afbc", "dct5f");
 insert into t1 values(1, 71, 2, 34, 5, 5.5, 31.313, 124.314, "2012-01-12", "2019-03-12 10:03:12", "2013-03-12 13:03:12", "3abd1c", "dcvf");
 select SINH(a), SINH(b), SINH(c), SINH(d), SINH(e), SINH(f), SINH(g), SINH(h), SINH(i), SINH(j), SINH(k), SINH(l) from t1;
+Function 'sinh' with parameters [DATE] is not supported.
 drop table t1;
 Create table t1(a float);
 insert into t1 select (SINH(1));
diff --git a/test/result/function/func_math_trig.result b/test/result/function/func_math_trig.result
index 1c624168f58ea761f9d8694263415c1953a637ba..0634d4f6c7a9828b6f17c27896b49223664d6f19 100644
--- a/test/result/function/func_math_trig.result
+++ b/test/result/function/func_math_trig.result
@@ -218,23 +218,11 @@ sin(h)	cos(h)	tan(h)	cot(h)	acos(h)	atan(h)
 0.9671992895453196	-0.2540187676196956	-3.8075898824663335	-0.2626333273457116	null	1.5014343848467917
 -0.9756589591814997	0.21929340019451712	-4.4491031573046556	-0.22476439962021863	null	1.5627523540210526
 select sin(i), cos(i), tan(i),cot(i),acos(i),atan(i) from t1;
-sin(i)	cos(i)	tan(i)	cot(i)	acos(i)	atan(i)
--0.9636543983126696	0.26715201779632264	-3.6071387604018113	-0.2772280376285293	null	1.570796277093873
--0.956530116604801	-0.29163356464578255	3.2799040733414904	0.3048869654840921	null	1.5707962770939028
--0.379315563851257	-0.9252673683969423	0.40995238436694714	2.4393076809254586	null	1.570796277069164
-0.9818578412426335	-0.18961851067434182	-5.178069576387055	-0.19312216362641843	null	1.570796277093384
+Function 'sin' with parameters [DATE] is not supported.
 select sin(k), cos(k), tan(k),cot(k),acos(k),atan(k) from t1;
-sin(k)	cos(k)	tan(k)	cot(k)	acos(k)	atan(k)
-0.8778806798417133	-0.47887943363716434	-1.8331977073520822	-0.545494899971496	null	1.5707963267948468
-0.9999514571273109	0.009853090325767762	101.48607432454384	0.009853568646296091	null	1.570796326794847
-0.516262324727047	0.8564305062685618	0.60280702397721	1.6589056866029592	null	1.570796326794847
--0.9970865277426668	0.07627880566757722	-13.07160644449477	-0.07650169122259333	null	1.570796326794847
+Function 'sin' with parameters [DATETIME] is not supported.
 select sin(l), cos(l), tan(l),cot(l),acos(l),atan(l) from t1;
-sin(l)	cos(l)	tan(l)	cot(l)	acos(l)	atan(l)
-0.8680231381149973	0.49652374736460725	1.7482006504667553	0.572016718866343	null	1.5707963267948473
-0.9901712503120509	-0.13986026975331417	-7.079717864540923	-0.14124856655779233	null	1.5707963267948475
--0.9712775413663274	0.23794944344835564	-4.081865152910655	-0.24498604499144958	null	1.5707963267948466
--0.604309316197871	0.7967498041144796	-0.7584681076508202	-1.3184469985129224	null	1.570796326794847
+Function 'sin' with parameters [TIMESTAMP] is not supported.
 drop table t1;
 Create table t1(a float);
 insert into t1 select (sin(1));
diff --git a/test/result/function/func_string_lpad_rpad.result b/test/result/function/func_string_lpad_rpad.result
index 185025bcf440567fccf402a0372a6db51fe5ce21..febb1b74ca7652c9859ebcb125734bfec2a5e703 100644
--- a/test/result/function/func_string_lpad_rpad.result
+++ b/test/result/function/func_string_lpad_rpad.result
@@ -203,8 +203,7 @@ SELECT ((+0) IN
 (32767.1)));
 Can't cast '1.01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...' from VARCHAR type to BIGINT type.
 SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
-((rpad(1.0,2048,1)) = ('4(') ^ (0.1))
-0
+Can't cast '1.01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...' from VARCHAR type to BIGINT type.
 SELECT RPAD("浣犲ソ", 10, "鍐嶈");
 RPAD("浣犲ソ", 10, "鍐嶈")
 浣犲ソ鍐嶈鍐嶈鍐嶈鍐嶈
diff --git a/test/result/function/func_string_oct.result b/test/result/function/func_string_oct.result
index bc990a8c164ab04b48a87e5b298b6c41a8b0b87b..710412206df133a0914049982acd44155eb7d068 100644
--- a/test/result/function/func_string_oct.result
+++ b/test/result/function/func_string_oct.result
@@ -46,11 +46,7 @@ insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
 insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314, "2012-03-12", "2012-03-12 10:03:12", "2012-03-12 13:03:12", "abc", "dcf");
 select oct(a),oct(b),oct(c),oct(d),oct(e),oct(f),oct(g),oct(h),oct(i),oct(k),oct(l),oct(m),oct(n) from t1;
-oct(a)	oct(b)	oct(c)	oct(d)	oct(e)	oct(f)	oct(g)	oct(h)	oct(i)	oct(k)	oct(l)	oct(m)	oct(n)
-1	1	2	4	5	5	37	16	3734	3734	3734	0	0
-1	1	2	4	5	5	37	16	3734	3734	3734	0	0
-1	1	2	4	5	5	37	16	3734	3734	3734	0	0
-1	1	2	4	5	5	37	16	3734	3734	3734	0	0
+Function 'oct' with parameters [DATE] is not supported.
 drop table t1;
 CREATE TABLE t1(a char(255), b varchar(255));
 INSERT INTO t1 select oct(56), oct(234);
diff --git a/test/result/prepare/prepare_all.result b/test/result/prepare/prepare_all.result
index 33ecc6783030bf8214afc39cf95d164c410f7ea4..6ca77c092948faff9f174a7be70af361acbb83bd 100644
--- a/test/result/prepare/prepare_all.result
+++ b/test/result/prepare/prepare_all.result
@@ -27,7 +27,7 @@ PREPARE s2 FROM 'SELECT * FROM numbers WHERE si=?';
 EXECUTE s2 USING @ui_min;
 pk    ui    si
 EXECUTE s2 USING @ui_max;
-pk    ui    si
+Can't cast '18446744073709551615' from BIGINT UNSIGNED type to BIGINT type. Reason: overflow
 EXECUTE s2 USING @si_min;
 pk    ui    si
 0    0    -9223372036854775808
@@ -627,8 +627,7 @@ EXECUTE s USING @maxint;
 DEALLOCATE PREPARE s;
 PREPARE s FROM 'SELECT 0 + ?';
 EXECUTE s USING @maxint;
-0 + ?
-18446744073709551615
+Can't cast '18446744073709551615' from BIGINT UNSIGNED type to BIGINT type. Reason: overflow
 DEALLOCATE PREPARE s;
 PREPARE s FROM 'SELECT concat(?,"")';
 EXECUTE s USING @maxint;