This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch calcite
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git

commit 3dafaddcfed2d5dd2a6bb05877a37a4ad691280f
Author: Bertil Chapuis <[email protected]>
AuthorDate: Wed Jun 21 00:00:07 2023 +0200

    Connect calcite to collections
---
 .../OpenStreetMapGeometriesBenchmark.java          |  2 +-
 .../java/org/apache/baremaps/calcite/Calcite.java  | 85 +++++++++++++---------
 .../apache/baremaps/collection/DataCollection.java |  2 +-
 .../org/apache/baremaps/collection/store/Row.java  | 23 ++++++
 .../apache/baremaps/collection/store/RowImpl.java  |  3 +
 .../baremaps/collection/store/TableAdapter.java    | 60 +++++++++++++++
 .../baremaps/collection/store/TableImpl.java       | 45 +++++++++---
 .../collection/{store => type}/RowDataType.java    | 44 +++++++----
 .../type/{ => geometry}/CoordinateDataType.java    |  4 +-
 .../baremaps/collection/type/DataTypeProvider.java | 58 ++++++++++++++-
 .../baremaps/workflow/tasks/ImportMonacoTest.java  |  2 +-
 .../workflow/tasks/ImportUpdateDataTest.java       |  2 +-
 .../tasks/ImportUpdateLiechtensteinTest.java       |  2 +-
 13 files changed, 266 insertions(+), 66 deletions(-)

diff --git 
a/baremaps-benchmark/src/main/java/org/apache/baremaps/benchmarks/OpenStreetMapGeometriesBenchmark.java
 
b/baremaps-benchmark/src/main/java/org/apache/baremaps/benchmarks/OpenStreetMapGeometriesBenchmark.java
index b1dcb42c..b079a1e5 100644
--- 
a/baremaps-benchmark/src/main/java/org/apache/baremaps/benchmarks/OpenStreetMapGeometriesBenchmark.java
+++ 
b/baremaps-benchmark/src/main/java/org/apache/baremaps/benchmarks/OpenStreetMapGeometriesBenchmark.java
@@ -30,8 +30,8 @@ import org.apache.baremaps.collection.DataMap;
 import org.apache.baremaps.collection.IndexedDataMap;
 import org.apache.baremaps.collection.memory.MemoryMappedFile;
 import org.apache.baremaps.collection.memory.OnHeapMemory;
-import org.apache.baremaps.collection.type.CoordinateDataType;
 import org.apache.baremaps.collection.type.LongListDataType;
+import org.apache.baremaps.collection.type.geometry.CoordinateDataType;
 import org.apache.baremaps.openstreetmap.model.Node;
 import org.apache.baremaps.openstreetmap.model.Relation;
 import org.apache.baremaps.openstreetmap.model.Way;
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/calcite/Calcite.java 
b/baremaps-core/src/main/java/org/apache/baremaps/calcite/Calcite.java
index 300f9af4..9d819f74 100644
--- a/baremaps-core/src/main/java/org/apache/baremaps/calcite/Calcite.java
+++ b/baremaps-core/src/main/java/org/apache/baremaps/calcite/Calcite.java
@@ -16,9 +16,12 @@ import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Properties;
+import org.apache.baremaps.collection.AppendOnlyBuffer;
+import org.apache.baremaps.collection.IndexedDataList;
+import org.apache.baremaps.collection.store.*;
+import org.apache.baremaps.collection.type.RowDataType;
 import org.apache.calcite.DataContext;
 import org.apache.calcite.jdbc.CalciteConnection;
 import org.apache.calcite.jdbc.JavaTypeFactoryImpl;
@@ -33,24 +36,37 @@ import org.apache.calcite.sql.type.SqlTypeName;
 
 public class Calcite {
 
-  public static final List<Object[]> PLAYER_DATA_AS_OBJECT_ARRAY = 
Arrays.asList(
-      new Object[] {1, "Wizard", 5},
-      new Object[] {2, "Hunter", 7}
+  private static final Schema PLAYER_SCHEMA = new SchemaImpl("player", List.of(
+      new ColumnImpl("id", Integer.class),
+      new ColumnImpl("name", String.class),
+      new ColumnImpl("level", Integer.class)));
 
-  );
-  public static final List<Object[]> EQUIPMENT_DATA_AS_OBJECT_ARRAY = 
Arrays.asList(
-      new Object[] {1, "fireball", 7, 1},
-      new Object[] {2, "rifle", 4, 2});
+  private static final Table PLAYER_TABLE = new TableImpl(
+      PLAYER_SCHEMA,
+      new IndexedDataList<>(new AppendOnlyBuffer<>(new 
RowDataType(PLAYER_SCHEMA))));
 
+  static {
+    PLAYER_TABLE.add(new RowImpl(PLAYER_TABLE.schema(), List.of(1, "Wizard", 
5)));
+    PLAYER_TABLE.add(new RowImpl(PLAYER_TABLE.schema(), List.of(2, "Hunter", 
7)));
+  }
 
-  public static void main(String[] args) throws SQLException {
+  private static final Schema EQUIPMENT_SCHEMA = new SchemaImpl("equipment", 
List.of(
+      new ColumnImpl("id", Integer.class),
+      new ColumnImpl("name", String.class),
+      new ColumnImpl("damage", Integer.class),
+      new ColumnImpl("player_id", Integer.class)));
 
+  private static final Table EQUIPMENT_TABLE = new TableImpl(
+      EQUIPMENT_SCHEMA,
+      new IndexedDataList<>(new AppendOnlyBuffer<>(new 
RowDataType(EQUIPMENT_SCHEMA))));
 
-    RelDataTypeFactory typeFactory = new JavaTypeFactoryImpl();
-    RelDataTypeFactory.Builder playerType = new 
RelDataTypeFactory.Builder(typeFactory);
+  static {
+    EQUIPMENT_TABLE.add(new RowImpl(EQUIPMENT_TABLE.schema(), List.of(1, 
"fireball", 7, 1)));
+    EQUIPMENT_TABLE.add(new RowImpl(EQUIPMENT_TABLE.schema(), List.of(2, 
"rifle", 4, 2)));
+  }
 
+  public static void main(String[] args) throws SQLException {
     Properties info = new Properties();
-    // 
https://calcite.apache.org/javadocAggregate/org/apache/calcite/config/Lex.html#JAVA
     info.setProperty("lex", "MYSQL");
 
     Connection connection = DriverManager.getConnection("jdbc:calcite:", info);
@@ -59,24 +75,12 @@ public class Calcite {
 
     SchemaPlus rootSchema = calciteConnection.getRootSchema();
 
-    playerType.add("id", SqlTypeName.INTEGER);
-    playerType.add("name", SqlTypeName.VARCHAR);
-    playerType.add("level", SqlTypeName.INTEGER);
-
-    ListTable playerTable = new ListTable(playerType.build(), 
PLAYER_DATA_AS_OBJECT_ARRAY);
+    ListTable playerTable = new ListTable(PLAYER_TABLE);
     rootSchema.add("player", playerTable);
 
-    RelDataTypeFactory.Builder equipmentType = new 
RelDataTypeFactory.Builder(typeFactory);
-
-    equipmentType.add("id", SqlTypeName.INTEGER);
-    equipmentType.add("name", SqlTypeName.VARCHAR);
-    equipmentType.add("damage", SqlTypeName.INTEGER);
-    equipmentType.add("player_id", SqlTypeName.INTEGER);
-
-    ListTable equipmentTable = new ListTable(equipmentType.build(), 
EQUIPMENT_DATA_AS_OBJECT_ARRAY);
+    ListTable equipmentTable = new ListTable(EQUIPMENT_TABLE);
     rootSchema.add("equipment", equipmentTable);
 
-
     String sql =
         "SELECT player.name, equipment.name FROM player INNER JOIN equipment 
ON player.id = equipment.player_id ";
     ResultSet resultSet = connection.createStatement().executeQuery(sql);
@@ -87,7 +91,6 @@ public class Calcite {
     }
     System.out.println(b);
 
-
     resultSet.close();
   }
 
@@ -95,22 +98,36 @@ public class Calcite {
    * A simple table based on a list.
    */
   private static class ListTable extends AbstractTable implements 
ScannableTable {
-    private final RelDataType rowType;
-    private final List<Object[]> data;
 
-    ListTable(RelDataType rowType, List<Object[]> data) {
-      this.rowType = rowType;
-      this.data = data;
+    private final Table table;
+
+    ListTable(Table table) {
+      this.table = table;
     }
 
     @Override
     public Enumerable<Object[]> scan(final DataContext root) {
-      return Linq4j.asEnumerable(data);
+      var collection = new TableAdapter<>(table, row -> 
row.values().toArray());
+      return Linq4j.asEnumerable(collection);
     }
 
     @Override
     public RelDataType getRowType(final RelDataTypeFactory typeFactory) {
-      return rowType;
+      var rowType = new RelDataTypeFactory.Builder(typeFactory);
+      for (Column column : table.schema().columns()) {
+        rowType.add(column.name(), toSqlType(column.type()));
+      }
+      return rowType.build();
+    }
+
+    private RelDataType toSqlType(Class type) {
+      if (type.equals(Integer.class)) {
+        return new JavaTypeFactoryImpl().createSqlType(SqlTypeName.INTEGER);
+      } else if (type.equals(String.class)) {
+        return new JavaTypeFactoryImpl().createSqlType(SqlTypeName.VARCHAR);
+      } else {
+        throw new IllegalArgumentException();
+      }
     }
   }
 }
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/DataCollection.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/DataCollection.java
index 394af1ae..772f8d01 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/DataCollection.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/DataCollection.java
@@ -21,7 +21,7 @@ public interface DataCollection<E> extends Collection<E> {
    *
    * @return the number of values
    */
-  public abstract long sizeAsLong();
+  long sizeAsLong();
 
   /** {@inheritDoc} */
   default int size() {
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/Row.java 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/Row.java
index 8f10ce81..d0f0b82a 100644
--- a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/Row.java
+++ b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/Row.java
@@ -65,4 +65,27 @@ public interface Row {
    */
   void set(int index, Object value);
 
+  /**
+   * Sets the value of the specified column and returns the row.
+   *
+   * @param column the column
+   * @param value the value
+   * @return the row
+   */
+  default Row with(String column, Object value) {
+    set(column, value);
+    return this;
+  }
+
+  /**
+   * Sets the value of the specified column and returns the row.
+   *
+   * @param index the index of the column
+   * @param value the value
+   * @return the row
+   */
+  default Row with(int index, Object value) {
+    set(index, value);
+    return this;
+  }
 }
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowImpl.java 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowImpl.java
index 71d682aa..d3824ad7 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowImpl.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowImpl.java
@@ -54,6 +54,9 @@ public record RowImpl(Schema schema, List values) implements 
Row {
     throw new IllegalArgumentException("Column " + column + " not found.");
   }
 
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public void set(int index, Object value) {
     values.set(index, value);
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableAdapter.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableAdapter.java
new file mode 100644
index 00000000..4976776c
--- /dev/null
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableAdapter.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+
+package org.apache.baremaps.collection.store;
+
+import java.util.AbstractCollection;
+import java.util.Iterator;
+import java.util.function.Function;
+
+public class TableAdapter<T> extends AbstractCollection<T> {
+
+  private final Function<Row, T> transformer;
+
+  private final Table table;
+
+  public TableAdapter(Table table, Function<Row, T> transformer) {
+    this.transformer = transformer;
+    this.table = table;
+  }
+
+  @Override
+  public Iterator iterator() {
+    return new TableIterator(table.iterator());
+  }
+
+  @Override
+  public int size() {
+    return table.size();
+  }
+
+  private class TableIterator implements Iterator<T> {
+
+    private final Iterator<Row> iterator;
+
+    public TableIterator(Iterator<Row> iterator) {
+      this.iterator = iterator;
+    }
+
+    @Override
+    public boolean hasNext() {
+      return iterator.hasNext();
+    }
+
+    @Override
+    public T next() {
+      var row = iterator.next();
+      return transformer.apply(row);
+    }
+  }
+
+}
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableImpl.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableImpl.java
index 6be35e4f..e4a511f7 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableImpl.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/store/TableImpl.java
@@ -12,37 +12,64 @@
 
 package org.apache.baremaps.collection.store;
 
-import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import org.apache.baremaps.collection.AbstractDataCollection;
+import org.apache.baremaps.collection.DataCollection;
 
 /**
  * A table is a collection of rows respecting a schema.
  */
-public class TableImpl extends ArrayList<Row> implements Table {
+public class TableImpl extends AbstractDataCollection<Row> implements Table {
 
-  private final Schema dataType;
+  private final Schema schema;
+
+  private final Collection<Row> rows;
 
   /**
    * Constructs a table with the specified schema.
    *
    * @param schema the schema of the table
+   * @param rows the collection of rows
    */
-  public TableImpl(Schema schema) {
-    this.dataType = schema;
+  public TableImpl(Schema schema, Collection<Row> rows) {
+    this.schema = schema;
+    this.rows = rows;
   }
 
   /**
    * {@inheritDoc}
    */
   @Override
-  public long sizeAsLong() {
-    return size();
+  public Schema schema() {
+    return schema;
   }
 
   /**
    * {@inheritDoc}
    */
   @Override
-  public Schema schema() {
-    return dataType;
+  public boolean add(Row e) {
+    return rows.add(e);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public Iterator<Row> iterator() {
+    return rows.iterator();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public long sizeAsLong() {
+    if (rows instanceof DataCollection dataCollection) {
+      return dataCollection.sizeAsLong();
+    } else {
+      return rows.size();
+    }
   }
 }
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowDataType.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/type/RowDataType.java
similarity index 59%
rename from 
baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowDataType.java
rename to 
baremaps-core/src/main/java/org/apache/baremaps/collection/type/RowDataType.java
index 164a264e..df9cd00a 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/store/RowDataType.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/type/RowDataType.java
@@ -10,24 +10,42 @@
  * the License.
  */
 
-package org.apache.baremaps.collection.store;
+package org.apache.baremaps.collection.type;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Map;
-import org.apache.baremaps.collection.type.*;
+import org.apache.baremaps.collection.store.Row;
+import org.apache.baremaps.collection.store.RowImpl;
+import org.apache.baremaps.collection.store.Schema;
+import org.apache.baremaps.collection.type.geometry.*;
+import org.locationtech.jts.geom.*;
 
 public class RowDataType implements DataType<Row> {
 
-  private static final Map<Class, DataType> types = Map.of(
-      Byte.class, new ByteDataType(),
-      Boolean.class, new BooleanDataType(),
-      Short.class, new ShortDataType(),
-      Integer.class, new IntegerDataType(),
-      Long.class, new LongDataType(),
-      Float.class, new FloatDataType(),
-      Double.class, new DoubleDataType(),
-      String.class, new StringDataType());
+  private static final Map<Class, DataType> types;
+
+  static {
+    types = new HashMap<>();
+    types.put(Byte.class, new ByteDataType());
+    types.put(Boolean.class, new BooleanDataType());
+    types.put(Short.class, new ShortDataType());
+    types.put(Integer.class, new IntegerDataType());
+    types.put(Long.class, new LongDataType());
+    types.put(Float.class, new FloatDataType());
+    types.put(Double.class, new DoubleDataType());
+    types.put(String.class, new StringDataType());
+    types.put(Geometry.class, new GeometryDataType());
+    types.put(Point.class, new PointDataType());
+    types.put(LineString.class, new LineStringDataType());
+    types.put(Polygon.class, new PolygonDataType());
+    types.put(MultiPoint.class, new MultiPointDataType());
+    types.put(MultiLineString.class, new MultiLineStringDataType());
+    types.put(MultiPolygon.class, new MultiPolygonDataType());
+    types.put(GeometryCollection.class, new GeometryCollectionDataType());
+    types.put(Coordinate.class, new CoordinateDataType());
+  }
 
   private final Schema schema;
 
@@ -62,8 +80,8 @@ public class RowDataType implements DataType<Row> {
       var columnType = column.type();
       var dataType = types.get(columnType);
       var value = row.get(i);
-      dataType.write(buffer, position, value);
-      p += dataType.size(buffer, position);
+      dataType.write(buffer, p, value);
+      p += dataType.size(buffer, p);
     }
     buffer.putInt(position, p - position);
   }
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/type/CoordinateDataType.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/type/geometry/CoordinateDataType.java
similarity index 88%
rename from 
baremaps-core/src/main/java/org/apache/baremaps/collection/type/CoordinateDataType.java
rename to 
baremaps-core/src/main/java/org/apache/baremaps/collection/type/geometry/CoordinateDataType.java
index 427d34b6..385fc8fb 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/collection/type/CoordinateDataType.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/collection/type/geometry/CoordinateDataType.java
@@ -10,11 +10,13 @@
  * the License.
  */
 
-package org.apache.baremaps.collection.type;
+package org.apache.baremaps.collection.type.geometry;
 
 
 
 import java.nio.ByteBuffer;
+import org.apache.baremaps.collection.type.DataType;
+import org.apache.baremaps.collection.type.MemoryAlignedDataType;
 import org.locationtech.jts.geom.Coordinate;
 
 /** A {@link DataType} for reading and writing {@link Coordinate}s in {@link 
ByteBuffer}s. */
diff --git 
a/baremaps-core/src/test/java/org/apache/baremaps/collection/type/DataTypeProvider.java
 
b/baremaps-core/src/test/java/org/apache/baremaps/collection/type/DataTypeProvider.java
index b2662472..52c9bdde 100644
--- 
a/baremaps-core/src/test/java/org/apache/baremaps/collection/type/DataTypeProvider.java
+++ 
b/baremaps-core/src/test/java/org/apache/baremaps/collection/type/DataTypeProvider.java
@@ -17,6 +17,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Stream;
 import org.apache.baremaps.collection.store.ColumnImpl;
+import org.apache.baremaps.collection.store.Row;
 import org.apache.baremaps.collection.store.Schema;
 import org.apache.baremaps.collection.store.SchemaImpl;
 import org.apache.baremaps.collection.type.geometry.*;
@@ -25,8 +26,58 @@ import org.locationtech.jts.geom.*;
 
 public class DataTypeProvider {
 
-  private final Schema schema = new SchemaImpl("row",
-      List.of(new ColumnImpl("integer", Integer.class), new 
ColumnImpl("string", String.class)));
+  private static final GeometryFactory geometryFactory = new GeometryFactory();
+
+  private static final Schema schema = new SchemaImpl("row", List.of(
+      new ColumnImpl("byte", Byte.class),
+      new ColumnImpl("boolean", Boolean.class),
+      new ColumnImpl("short", Short.class),
+      new ColumnImpl("integer", Integer.class),
+      new ColumnImpl("long", Long.class),
+      new ColumnImpl("float", Float.class),
+      new ColumnImpl("double", Double.class),
+      new ColumnImpl("string", String.class),
+      new ColumnImpl("geometry", Geometry.class),
+      new ColumnImpl("point", Point.class),
+      new ColumnImpl("linestring", LineString.class),
+      new ColumnImpl("polygon", Polygon.class),
+      new ColumnImpl("multipoint", MultiPoint.class),
+      new ColumnImpl("multilinestring", MultiLineString.class),
+      new ColumnImpl("multipolygon", MultiPolygon.class),
+      new ColumnImpl("geometrycollection", GeometryCollection.class),
+      new ColumnImpl("coordinate", Coordinate.class)));
+
+  private static final Row row = schema.createRow()
+      .with("byte", Byte.MAX_VALUE)
+      .with("boolean", true)
+      .with("short", Short.MAX_VALUE)
+      .with("integer", Integer.MAX_VALUE)
+      .with("long", Long.MAX_VALUE)
+      .with("float", Float.MAX_VALUE)
+      .with("double", Double.MAX_VALUE)
+      .with("string", "Hello, World!")
+      .with("geometry", geometryFactory.createPoint(new Coordinate(0, 0)))
+      .with("point", geometryFactory.createPoint(new Coordinate(0, 0)))
+      .with("linestring",
+          geometryFactory
+              .createLineString(new Coordinate[] {new Coordinate(0, 0), new 
Coordinate(1, 1)}))
+      .with("polygon",
+          geometryFactory.createPolygon(new Coordinate[] {new Coordinate(0, 0),
+              new Coordinate(1, 1), new Coordinate(0, 1), new Coordinate(0, 
0)}))
+      .with("multipoint",
+          geometryFactory
+              .createMultiPoint(new Coordinate[] {new Coordinate(0, 0), new 
Coordinate(1, 1)}))
+      .with("multilinestring",
+          geometryFactory.createMultiLineString(new LineString[] 
{geometryFactory
+              .createLineString(new Coordinate[] {new Coordinate(0, 0), new 
Coordinate(1, 1)})}))
+      .with("multipolygon",
+          geometryFactory.createMultiPolygon(
+              new Polygon[] {geometryFactory.createPolygon(new Coordinate[] 
{new Coordinate(0, 0),
+                  new Coordinate(1, 1), new Coordinate(0, 1), new 
Coordinate(0, 0)})}))
+      .with("geometrycollection",
+          geometryFactory.createGeometryCollection(
+              new Geometry[] {geometryFactory.createPoint(new Coordinate(0, 
0))}))
+      .with("coordinate", new Coordinate(0, 0));
 
   private static Stream<Arguments> dataTypes() {
     return Stream.of(
@@ -267,8 +318,7 @@ public class DataTypeProvider {
                                             new Coordinate(4, 1), new 
Coordinate(3, 1)})})})),
 
         // Row
-        // Arguments.of(new RowDataType(sc), )
-
+        Arguments.of(new RowDataType(schema), row),
 
         // Geometry
         Arguments.of(new GeometryDataType(),
diff --git 
a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportMonacoTest.java
 
b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportMonacoTest.java
index 00770518..84c903f8 100644
--- 
a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportMonacoTest.java
+++ 
b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportMonacoTest.java
@@ -20,8 +20,8 @@ import org.apache.baremaps.collection.AppendOnlyBuffer;
 import org.apache.baremaps.collection.DataMap;
 import org.apache.baremaps.collection.IndexedDataMap;
 import org.apache.baremaps.collection.memory.OnHeapMemory;
-import org.apache.baremaps.collection.type.CoordinateDataType;
 import org.apache.baremaps.collection.type.LongListDataType;
+import org.apache.baremaps.collection.type.geometry.CoordinateDataType;
 import org.apache.baremaps.openstreetmap.DiffService;
 import org.apache.baremaps.openstreetmap.model.Header;
 import org.apache.baremaps.openstreetmap.postgres.PostgresCoordinateMap;
diff --git 
a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateDataTest.java
 
b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateDataTest.java
index 0b947cb6..6d92d4c2 100644
--- 
a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateDataTest.java
+++ 
b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateDataTest.java
@@ -23,8 +23,8 @@ import org.apache.baremaps.collection.AppendOnlyBuffer;
 import org.apache.baremaps.collection.DataMap;
 import org.apache.baremaps.collection.IndexedDataMap;
 import org.apache.baremaps.collection.memory.OnHeapMemory;
-import org.apache.baremaps.collection.type.CoordinateDataType;
 import org.apache.baremaps.collection.type.LongListDataType;
+import org.apache.baremaps.collection.type.geometry.CoordinateDataType;
 import org.apache.baremaps.openstreetmap.model.Header;
 import org.apache.baremaps.openstreetmap.model.Node;
 import org.apache.baremaps.openstreetmap.model.Way;
diff --git 
a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateLiechtensteinTest.java
 
b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateLiechtensteinTest.java
index 309f2504..7fe302a3 100644
--- 
a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateLiechtensteinTest.java
+++ 
b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateLiechtensteinTest.java
@@ -22,8 +22,8 @@ import org.apache.baremaps.collection.AppendOnlyBuffer;
 import org.apache.baremaps.collection.DataMap;
 import org.apache.baremaps.collection.IndexedDataMap;
 import org.apache.baremaps.collection.memory.OnHeapMemory;
-import org.apache.baremaps.collection.type.CoordinateDataType;
 import org.apache.baremaps.collection.type.LongListDataType;
+import org.apache.baremaps.collection.type.geometry.CoordinateDataType;
 import org.apache.baremaps.openstreetmap.DiffService;
 import org.apache.baremaps.openstreetmap.model.Header;
 import org.apache.baremaps.openstreetmap.postgres.PostgresCoordinateMap;

Reply via email to