@Override
    public Updater.ForZoom forZoom(int zoom) {
      return layer -> {
        var stats = layers.computeIfAbsent(layer, StatsForLayer::new);
        stats.expandZoomRangeToInclude(zoom);
        return (key, value) -> {
          FieldType fieldType = null;
          if (value instanceof Number) {
            fieldType = FieldType.NUMBER;
          } else if (value instanceof Boolean) {
            fieldType = FieldType.BOOLEAN;
          } else if (value != null) {
            fieldType = FieldType.STRING;
          }
          if (fieldType != null) {
            // widen different types to string
            stats.fields.merge(key, fieldType, FieldType::merge);
          }
        };
      };
    }
Accepts features from a single thread that will be combined across all threads in {@link #getTileStats()}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/LayerAttrStats.java