diff --git a/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java b/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java index 974a49d9d9f34..4e8021bce7ece 100644 --- a/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java +++ b/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java @@ -1955,20 +1955,20 @@ public Scope getTargetTableScope() public static final class CreateVectorIndexAnalysis { private final QualifiedObjectName sourceTableName; - private final QualifiedObjectName targetTableName; + private final QualifiedObjectName indexName; private final List columns; private final Map properties; private final Optional updatingFor; public CreateVectorIndexAnalysis( QualifiedObjectName sourceTableName, - QualifiedObjectName targetTableName, + QualifiedObjectName indexName, List columns, Map properties, Optional updatingFor) { this.sourceTableName = requireNonNull(sourceTableName, "sourceTableName is null"); - this.targetTableName = requireNonNull(targetTableName, "targetTableName is null"); + this.indexName = requireNonNull(indexName, "indexName is null"); this.columns = ImmutableList.copyOf(requireNonNull(columns, "columns is null")); this.properties = ImmutableMap.copyOf(requireNonNull(properties, "properties is null")); this.updatingFor = requireNonNull(updatingFor, "updatingFor is null"); @@ -1979,9 +1979,9 @@ public QualifiedObjectName getSourceTableName() return sourceTableName; } - public QualifiedObjectName getTargetTableName() + public QualifiedObjectName getIndexName() { - return targetTableName; + return indexName; } public List getColumns() diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java index 7c04d578fc832..596fa288e9d76 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java @@ -420,7 +420,7 @@ private RelationPlan createVectorIndexPlan(Analysis analysis, CreateVectorIndex Analysis.CreateVectorIndexAnalysis vectorIndexAnalysis = analysis.getCreateVectorIndexAnalysis().get(); QualifiedObjectName sourceTableName = vectorIndexAnalysis.getSourceTableName(); - QualifiedObjectName targetTableName = vectorIndexAnalysis.getTargetTableName(); + QualifiedObjectName indexName = vectorIndexAnalysis.getIndexName(); // Resolve source table handle and metadata TableHandle sourceTableHandle = metadata.getHandleVersion(session, sourceTableName, Optional.empty()) @@ -536,7 +536,7 @@ public Expression rewriteIdentifier(Identifier node, Void context, ExpressionTre Optional.empty()); // Build target table metadata with properties - ConnectorId connectorId = getConnectorIdOrThrow(session, metadata, targetTableName.getCatalogName()); + ConnectorId connectorId = getConnectorIdOrThrow(session, metadata, indexName.getCatalogName()); // Vector index properties are not registered with TablePropertyManager, so we evaluate // them directly. The connector's plan optimizer is responsible for validating these properties @@ -553,7 +553,7 @@ public Expression rewriteIdentifier(Identifier node, Void context, ExpressionTre ColumnMetadata.builder().setName("result").setType(VARCHAR).build()); ConnectorTableMetadata targetTableMetadata = new ConnectorTableMetadata( - toSchemaTableName(targetTableName), + toSchemaTableName(indexName), targetColumns, properties, Optional.empty());