>From Ian Maxon <[email protected]>: Attention is currently required from: Ali Alsuliman, Calvin Thomas Dani.
Ian Maxon has posted comments on this change by Calvin Thomas Dani. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126?usp=email ) Change subject: [ASTERIXDB-3676] Vector Distance Functions ...................................................................... Patch Set 30: (9 comments) File asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/VectorDistanceSqlppExecutionTest.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/66caf687_25ad39ff?usp=email : PS30, Line 42: public class VectorDistanceSqlppExecutionTest { i don't understand why this class is added instead of just running the vector queries in the main sqlpp suite? File asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/VectorQueries.xml: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/c0f8b5ef_68bd0b3a?usp=email : PS30, Line 20: check-warnings="false" why not check warnings? File asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/be5b2f37_087d60b8?usp=email : PS30, Line 35: /test-suite> the vector queries are mentioned as an entity, but not used. it should be both or neither. File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/747a5607_afe683c3?usp=email : PS30, Line 1206: public static final FunctionIdentifier DOT_DISTANCE_ARRAY = FunctionConstants.newAsterix("dot-distance", 2); dot isn't really a distance, is it? it's a similarity metric but not a distance, right? File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/hierachy/ATypeHierarchy.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/4a5a3b27_aaad28e0?usp=email : PS30, Line 151: public static ATypeTag getCommonNumericType(ATypeTag t1, ATypeTag t2) { unused File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/vector/VectorDistanceArrScalarEvaluator.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/bf1bba21_a6388cac?usp=email : PS30, Line 254: ExceptionUtil.warnUnsupportedType(ctx, sourceLoc, funcId.getName() + "()", leftArgType); : ExceptionUtil.warnUnsupportedType(ctx, sourceLoc, funcId.getName() + "()", rightArgType); why issue two warnings here, instead of one saying neither argument is a numeric list? https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/841d0f0b_9c32a279?usp=email : PS30, Line 421: org.apache.hyracks.api.exceptions.Warning.of would be nicer to just import the class or static method instead of using the fully qualified name File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/VectorDistanceArrCalculation.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/07136942_b07ee5a2?usp=email : PS30, Line 144: public static double manhattan(double[] a, double[] b) { this is unused. should it be removed? https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/a0372d05_48fc9639?usp=email : PS30, Line 171: return dot / (Math.sqrt(normA) * Math.sqrt(normB)); claude says this is similarity, not distance. a brief look at wikipedia seems to agree. why does this (and it's friends) not return 1-(A⋅B/(||A||||B||))? or should we rename it to similarity because that's what we need/use in most cases? -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126?usp=email To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I45176e7da13ed222f48bb36bd1f0ab4074a0bcb9 Gerrit-Change-Number: 20126 Gerrit-PatchSet: 30 Gerrit-Owner: Calvin Thomas Dani <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Attention: Calvin Thomas Dani <[email protected]> Gerrit-Attention: Ali Alsuliman <[email protected]> Gerrit-Comment-Date: Tue, 16 Jun 2026 22:45:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
