public void put(Object key, Row row) {
    Value existing = rows.get(key);
    if (existing != null) {
      existing.row = row;
    } else {
      if (lastKey != null) {
        rows.get(lastKey).nextKey = key;
      }
      rows.put(key, new Value(row, lastKey));
      lastKey = key;
      if (firstKey == null) {
        firstKey = key;
      }
    }
  }
Oracle's PL/SQL Table/associative array.

Tables can be modelled after a corresponding Hive table or they can be created manually.

1. Model the table after the emp Hive table
     TYPE t_tab IS TABLE OF emp%ROWTYPE INDEX BY BINARY_INTEGER;

2. Model the table after a column of a Hive table (emp.name). This table will hold a single column only.
     TYPE t_tab IS TABLE OF emp.name%TYPE INDEX BY BINARY_INTEGER;

3. Or you can specify the column manually. This table will hold one column only.
     TYPE t_tab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;

In the first case the values will be records where each key in the record matches the columns to the corresponding table.
   tab(key).col_name;

In the last two cases the values will represent scalars but they stored in a record with a single key.
   tab(key)

Iteration logic uses the first/last next and prior methods.
First/last returns a key, next/prior gives back the next or previous key based on the key passed in.
hplsql/src/main/java/org/apache/hive/hplsql/objects/Table.java