>From Calvin Thomas Dani <[email protected]>: Attention is currently required from: Ali Alsuliman, Ian Maxon.
Calvin Thomas Dani 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 33: (13 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/d2a17acd_0fdb296e?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 sq […] Acknowledged File asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/VectorQueries.xml: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/f94121ee_b1c59f0e?usp=email : PS30, Line 20: check-warnings="false" > why not check warnings? Acknowledged File asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/3bc4b2af_55a5624a?usp=email : PS30, Line 35: /test-suite> > the vector queries are mentioned as an entity, but not used. it should be > both or neither. Acknowledged 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/b0cf84e3_dbef75b3?usp=email : PS30, Line 151: public static ATypeTag getCommonNumericType(ATypeTag t1, ATypeTag t2) { > unused Acknowledged File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/vector/CosineDistanceArrDescriptor.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/adfc6d78_07ef42df?usp=email : PS30, Line 31: public class CosineDistanceArrDescriptor extends AbstractScalarFunctionDynamicDescriptor { > Annotate them all with `@MissingNullInOutFunction` since you return > MISSING/NULL if any arg is MISSI […] Acknowledged 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/a15c3dc9_c077f61a?usp=email : PS30, Line 48: public class VectorDistanceArrScalarEvaluator implements IScalarEvaluator { > Rename `VectorDistanceArrScalarEvaluator` -> `VectorDistanceEvaluator` Acknowledged https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/f6bc284d_8de31575?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? Acknowledged https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/6233f8f8_ba5895de?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 Acknowledged File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/vector/VectorListDecoder.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/d6f6f57c_b4c61d98?usp=email : PS30, Line 123: if (typeTag != listAccessor.getItemTypeAt(i) || typeTag != ATypeTag.DOUBLE) { > This can be simplified now to just check if the element is NUMERIC and then > read the element accordi […] Acknowledged File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/VectorDistanceArrCalculation.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/440acaa5_04a66316?usp=email : PS30, Line 22: public class VectorDistanceArrCalculation { > Rename `VectorDistanceArrCalculation` -> `VectorDistanceCalculation`. Acknowledged https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/ed3e31a7_51abce34?usp=email : PS30, Line 28: double sum = euclideanSquared(a, b); > I believe we already check they are of the same length inside the function. > […] @[email protected] looping you in, We wanted the responsibility of the arr length to be verified in function. Just confirming, I can go either way. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/f7299124_03f2bda6?usp=email : PS30, Line 144: public static double manhattan(double[] a, double[] b) { > this is unused. […] Acknowledged https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/22a44b43_e43a1edb?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. […] Actually with the next patch adds 1 - cosine. I'll move it in here and mark it as done. -- 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: 33 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: Ian Maxon <[email protected]> Gerrit-Attention: Ali Alsuliman <[email protected]> Gerrit-Comment-Date: Mon, 29 Jun 2026 07:29:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Ian Maxon <[email protected]> Comment-In-Reply-To: Ali Alsuliman <[email protected]>
