diff --git a/presto-iceberg/pom.xml b/presto-iceberg/pom.xml
index 036a44bef74e9..5ebe42b1eba96 100644
--- a/presto-iceberg/pom.xml
+++ b/presto-iceberg/pom.xml
@@ -31,6 +31,17 @@
+
+
+ io.github.jbellis
+ jvector
+ 4.0.0-rc.4
+
+
+ org.apache.commons
+ commons-math3
+
+
com.facebook.airlift
concurrent
@@ -752,11 +763,6 @@
-
- org.apache.commons
- commons-math3
- test
-
@@ -771,6 +777,7 @@
org.apache.httpcomponents.core5:httpcore5
com.amazonaws:aws-java-sdk-s3
com.amazonaws:aws-java-sdk-core
+ org.apache.commons:commons-math3
diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java
index eb6ea59912b76..558637bdf80df 100644
--- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java
+++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java
@@ -32,6 +32,7 @@
import com.facebook.presto.iceberg.changelog.ChangelogOperation;
import com.facebook.presto.iceberg.changelog.ChangelogUtil;
import com.facebook.presto.iceberg.statistics.StatisticsFileCache;
+import com.facebook.presto.iceberg.tvf.ApproxNearestNeighborsFunction;
import com.facebook.presto.spi.ColumnHandle;
import com.facebook.presto.spi.ColumnMetadata;
import com.facebook.presto.spi.ConnectorDeleteTableHandle;
@@ -60,7 +61,9 @@
import com.facebook.presto.spi.connector.ConnectorTableVersion;
import com.facebook.presto.spi.connector.ConnectorTableVersion.VersionOperator;
import com.facebook.presto.spi.connector.ConnectorTableVersion.VersionType;
+import com.facebook.presto.spi.connector.TableFunctionApplicationResult;
import com.facebook.presto.spi.function.StandardFunctionResolution;
+import com.facebook.presto.spi.function.table.ConnectorTableFunctionHandle;
import com.facebook.presto.spi.plan.FilterStatsCalculatorService;
import com.facebook.presto.spi.relation.RowExpression;
import com.facebook.presto.spi.relation.RowExpressionService;
@@ -259,6 +262,7 @@ public abstract class IcebergAbstractMetadata
protected Transaction transaction;
protected final StatisticsFileCache statisticsFileCache;
protected final IcebergTableProperties tableProperties;
+ protected final IcebergConfig icebergConfig;
private final StandardFunctionResolution functionResolution;
private final ConcurrentMap icebergTables = new ConcurrentHashMap<>();
@@ -272,7 +276,8 @@ public IcebergAbstractMetadata(
NodeVersion nodeVersion,
FilterStatsCalculatorService filterStatsCalculatorService,
StatisticsFileCache statisticsFileCache,
- IcebergTableProperties tableProperties)
+ IcebergTableProperties tableProperties,
+ IcebergConfig icebergConfig)
{
this.typeManager = requireNonNull(typeManager, "typeManager is null");
this.commitTaskCodec = requireNonNull(commitTaskCodec, "commitTaskCodec is null");
@@ -283,6 +288,7 @@ public IcebergAbstractMetadata(
this.filterStatsCalculatorService = requireNonNull(filterStatsCalculatorService, "filterStatsCalculatorService is null");
this.statisticsFileCache = requireNonNull(statisticsFileCache, "statisticsFileCache is null");
this.tableProperties = requireNonNull(tableProperties, "tableProperties is null");
+ this.icebergConfig = requireNonNull(icebergConfig, "icebergConfig is null");
}
protected final Table getIcebergTable(ConnectorSession session, SchemaTableName schemaTableName)
@@ -1424,6 +1430,11 @@ protected Optional getDataLocationBasedOnWarehouseDataDir(SchemaTableNam
return Optional.empty();
}
+ public TypeManager getTypeManager()
+ {
+ return typeManager;
+ }
+
@Override
public Optional