code: func GetCmpFunction(lhs, rhs Expression) CompareFunc {
  	switch GetAccurateCmpType(lhs, rhs) {
  	case types.ETInt:
  		return CompareInt
  	case types.ETReal:
  		return CompareReal
  	case types.ETDecimal:
  		return CompareDecimal
  	case types.ETString:
  		return CompareString
  	case types.ETDuration:
  		return CompareDuration
  	case types.ETDatetime, types.ETTimestamp:
  		return CompareTime
  	case types.ETJson:
  		return CompareJSON
  	}
  	return nil
  }
docs: // GetCmpFunction get the compare function according to two arguments.