class Vertica5DatabaseMeta extends VerticaDatabaseMeta {

  @Override
  public Object getValueFromResultSet( ResultSet rs, IValueMeta val, int index ) throws HopDatabaseException {
    Object data;

    try {
      switch ( val.getType() ) {
        case IValueMeta.TYPE_TIMESTAMP:
        case IValueMeta.TYPE_DATE:
          if ( val.getOriginalColumnType() == java.sql.Types.TIMESTAMP ) {
            data = rs.getTimestamp( index + 1 );
            break; // Timestamp extends java.util.Date
          } else if ( val.getOriginalColumnType() == java.sql.Types.TIME ) {
            data = rs.getTime( index + 1 );
            break;
          } else {
            data = rs.getDate( index + 1 );
            break;
          }
        default:
          return super.getValueFromResultSet( rs, val, index );
      }
      if ( rs.wasNull() ) {
        data = null;
      }
    } catch ( SQLException e ) {
      throw new HopDatabaseException( "Unable to get value '"
        + val.toStringMeta() + "' from database resultset, index " + index, e );
    }

    return data;
  }

}