Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Identifier> columns;
private final Map<String, Expression> properties;
private final Optional<Expression> updatingFor;

public CreateVectorIndexAnalysis(
QualifiedObjectName sourceTableName,
QualifiedObjectName targetTableName,
QualifiedObjectName indexName,
List<Identifier> columns,
Map<String, Expression> properties,
Optional<Expression> 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");
Expand All @@ -1979,9 +1979,9 @@ public QualifiedObjectName getSourceTableName()
return sourceTableName;
}

public QualifiedObjectName getTargetTableName()
public QualifiedObjectName getIndexName()
{
return targetTableName;
return indexName;
}

public List<Identifier> getColumns()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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
Expand All @@ -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());
Expand Down
Loading