>From Hongyu Shi <[email protected]>:

Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change. Please visit

    https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21649?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Contrib+1 by Anon. E. Moose #1000171, Integration-Tests+1 by Jenkins, 
Verified+1 by Jenkins


Change subject: [ASTERIXDB-3817][SQL++][COMP] One taxonomy for vector metric 
names
......................................................................

[ASTERIXDB-3817][SQL++][COMP] One taxonomy for vector metric names

- user model changes: yes
- storage format changes: no
- interface changes: yes

Details:
Metric names were resolved by two tables with different normalization and
compared as strings during index selection. The DDL accepted "cosine
similarity" that every query rejected. A query could accept "euclidean-squared"
and then silently miss its index.

VectorSimilarityMetric is now the only alias table. It drops "cosine
similarity" and the "-" to "_" mapping, and ignores case and surrounding
whitespace. VectorDistanceMetric instead looks up every spelling in that table
so the two cannot diverge. Since its only remaining job is choosing which
builtin implements the metric it is renamed VectorMetricFunctionMapUtil. Index
selection then compares enums and both error messages list the aliases the
table accepts.

Ext-ref: MB-73290
Change-Id: I07be9ec20dd45c73d404ba4ef09ede860509dc17
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceTopKAccessMethodRule.java
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/VectorIndexAccessMethod.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/vector/OptimizedScalarQuantizationCodec.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/vector/VectorSimilarityMetric.java
A 
asterixdb/asterix-common/src/test/java/org/apache/asterix/common/vector/VectorSimilarityMetricTest.java
D 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorDistanceMetric.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorIndexDeclUtil.java
A 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/VectorMetricFunctionMapUtil.java
M 
asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/SqlppVectorDistanceRewriteVisitor.java
D 
asterixdb/asterix-lang-sqlpp/src/test/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VectorDistanceMetricTest.java
A 
asterixdb/asterix-lang-sqlpp/src/test/java/org/apache/asterix/lang/sqlpp/rewrites/visitor/VectorMetricFunctionMapUtilTest.java
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/SecondaryVectorOperationsHelper.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/HierarchicalKMeansPlusPlusCentroidsOperatorDescriptor.java
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/VTreeBulkLoaderAndGroupingOperatorDescriptor.java
14 files changed, 330 insertions(+), 195 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/49/21649/3
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21649?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I07be9ec20dd45c73d404ba4ef09ede860509dc17
Gerrit-Change-Number: 21649
Gerrit-PatchSet: 3
Gerrit-Owner: Hongyu Shi <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>

Reply via email to