presto-main/src/main/java/io/prestosql/execution/warnings/DefaultWarningCollector.java/DefaultWarningCollector/add
class DefaultWarningCollector:    @Override
    public synchronized void add(PrestoWarning warning)
    {
        requireNonNull(warning, "warning is null");
        if (warnings.size() < config.getMaxWarnings()) {
            warnings.putIfAbsent(warning.getWarningCode(), warning);
        }
    }