Object getFieldValue(ResultSet resultSet, int columnIndex, FieldType fieldType,
      ResultSetMetaData metaData)
      throws SQLException {
    switch (fieldType) {
      case STRING:
        return resultSet.getString(columnIndex);
      case CHAR:
        return getCharValue(resultSet, columnIndex);
      case SHORT:
        return resultSet.getShort(columnIndex);
      case INT:
        return resultSet.getInt(columnIndex);
      case LONG:
        return resultSet.getLong(columnIndex);
      case FLOAT:
        return resultSet.getFloat(columnIndex);
      case DOUBLE:
        return resultSet.getDouble(columnIndex);
      case BYTE:
        return resultSet.getByte(columnIndex);
      case BOOLEAN:
        return resultSet.getBoolean(columnIndex);
      case DATE:
        return getDateValue(resultSet, columnIndex, metaData);
      case BYTE_ARRAY:
        return getByteArrayValue(resultSet, columnIndex, metaData);
      case BOOLEAN_ARRAY:
        return convertJdbcObjectToJavaType(boolean[].class, resultSet.getObject(columnIndex));
      case CHAR_ARRAY:
        return convertJdbcObjectToJavaType(char[].class, resultSet.getObject(columnIndex));
      case SHORT_ARRAY:
        return convertJdbcObjectToJavaType(short[].class, resultSet.getObject(columnIndex));
      case INT_ARRAY:
        return convertJdbcObjectToJavaType(int[].class, resultSet.getObject(columnIndex));
      case LONG_ARRAY:
        return convertJdbcObjectToJavaType(long[].class, resultSet.getObject(columnIndex));
      case FLOAT_ARRAY:
        return convertJdbcObjectToJavaType(float[].class, resultSet.getObject(columnIndex));
      case DOUBLE_ARRAY:
        return convertJdbcObjectToJavaType(double[].class, resultSet.getObject(columnIndex));
      case STRING_ARRAY:
        return convertJdbcObjectToJavaType(String[].class, resultSet.getObject(columnIndex));
      case OBJECT_ARRAY:
        return convertJdbcObjectToJavaType(Object[].class, resultSet.getObject(columnIndex));
      case ARRAY_OF_BYTE_ARRAYS:
        return convertJdbcObjectToJavaType(byte[][].class, resultSet.getObject(columnIndex));
      case OBJECT:
        return getObjectValue(resultSet, columnIndex, metaData);
      default:
        throw new IllegalStateException("unhandled pdx field type: " + fieldType);
    }
  }
@throws SQLException if the column value get fails
geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstance.java