Search in sources :

Example 1 with AccumulationLimitExceededException

use of com.hazelcast.jet.impl.memory.AccumulationLimitExceededException in project hazelcast by hazelcast.

the class SqlHashJoinP method tryProcess1.

@Override
protected boolean tryProcess1(@Nonnull Object item) {
    if (hashMap.size() == maxItemsInHashTable) {
        throw new AccumulationLimitExceededException();
    }
    JetSqlRow rightRow = (JetSqlRow) item;
    ObjectArrayKey joinKeys = ObjectArrayKey.project(rightRow, joinInfo.rightEquiJoinIndices());
    // if there's a null in the key, then `null = null` is UNKNOWN in SQL, ignore such keys
    if (joinKeys.containsNull()) {
        return true;
    }
    hashMap.put(joinKeys, rightRow);
    return true;
}
Also used : ObjectArrayKey(com.hazelcast.jet.sql.impl.ObjectArrayKey) JetSqlRow(com.hazelcast.sql.impl.row.JetSqlRow) AccumulationLimitExceededException(com.hazelcast.jet.impl.memory.AccumulationLimitExceededException)

Aggregations

AccumulationLimitExceededException (com.hazelcast.jet.impl.memory.AccumulationLimitExceededException)1 ObjectArrayKey (com.hazelcast.jet.sql.impl.ObjectArrayKey)1 JetSqlRow (com.hazelcast.sql.impl.row.JetSqlRow)1