code: public static Object getCastingValue(ColumnType columnType, Object value) throws ExecutionException {
          validateInput(columnType);
          Object returnValue = null;
          if (value != null) {
              switch (columnType.getDataType()) {
  
                  case BIGINT:
                      ensureNumber(value);
                      returnValue = ((Number) value).longValue();
                      break;
                  case DOUBLE:
                      ensureNumber(value);
                      returnValue = ((Number) value).doubleValue();
                      break;
                  case FLOAT:
                      ensureNumber(value);
                      returnValue = ((Number) value).floatValue();
                      break;
                  case INT:
                      ensureNumber(value);
                      returnValue = ((Number) value).intValue();
                      break;
                  default:
                      returnValue = value;
  
              }
          }
  
          return returnValue;
      }
docs: Return a casting value adapt to columntType.
  
  @param columnType the columnType.
  @param value      the value.
  @return the casting value.
  @throws ExecutionException if the casting is not possible.