public Table create()

in baremaps-calcite/src/main/java/org/apache/baremaps/calcite/BaremapsTableFactory.java [64:85]


  public Table create(
      SchemaPlus schema,
      String name,
      Map<String, Object> operand,
      RelDataType rowType) {
    String format = (String) operand.get("format");
    if (format == null) {
      throw new IllegalArgumentException("Format must be specified in the 'format' operand");
    }

    return switch (format) {
      case "data" -> dataTableFactory.create(schema, name, operand, rowType);
      case "osm" -> openStreetMapTableFactory.create(schema, name, operand, rowType);
      case "csv" -> csvTableFactory.create(schema, name, operand, rowType);
      case "shp" -> shapefileTableFactory.create(schema, name, operand, rowType);
      case "rpsl" -> rpslTableFactory.create(schema, name, operand, rowType);
      case "fgb" -> flatGeoBufTableFactory.create(schema, name, operand, rowType);
      case "parquet" -> geoParquetTableFactory.create(schema, name, operand, rowType);
      case "geopackage" -> geoPackageTableFactory.create(schema, name, operand, rowType);
      default -> throw new IllegalArgumentException("Unsupported format: " + format);
    };
  }