>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 26: (24 comments) Commit Message: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/314ad79e_f7b27273?usp=email : PS17, Line 7: NO ISSUE > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/085bb07b_c011c19a?usp=email : PS17, Line 9: no > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/fa9a0e59_ca4c4082?usp=email : PS17, Line 14: vector_distance_constant() > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/e3b568c4_d644602e?usp=email : PS17, Line 17: KNN > Acknowledged Done File asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/distance-functions/vector_distance.1.ddl.sqlpp: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/c4b4a976_25607671?usp=email : PS15, Line 1: /* > these files shouldn't be executable Done File asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/CommonFunctionMapUtil.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/1f35682e_d93ce65a?usp=email : PS19, Line 174: addFunctionMapping("euclidean_dist", "euclidean-dist"); : addFunctionMapping("manhattan_dist", "manhattan-dist"); : addFunctionMapping("dot_dist", "dot-dist"); : addFunctionMapping("cosine_dist", "cosine-dist"); > Acknowledged Done File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/c300ea33_1ad5e08b?usp=email : PS19, Line 1892: INSTANCE > Acknowledged Done 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/c4a5cb36_4e93cfb3?usp=email : PS19, Line 37: DescriptorFactoryUtil : .createFactory(CosineDistanceArrDescriptor::new, FunctionTypeInferers.SET_ARGUMENTS_TYPE); > Acknowledged Done 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/cf4c11dd_faab4d83?usp=email : PS17, Line 76: private static final UTF8StringPointable EUCLIDEAN_DISTANCE_L2 = UTF8StringPointable.generateUTF8Pointable("l2"); : private static final UTF8StringPointable EUCLIDEAN_DISTANCE = : UTF8StringPointable.generateUTF8Pointable("euclidean"); : private static final UTF8StringPointable EUCLIDEAN_DISTANCE_L2_SQUARED = : UTF8StringPointable.generateUTF8Pointable("l2_squared"); : private static final UTF8StringPointable EUCLIDEAN_DISTANCE_SQUARED = : UTF8StringPointable.generateUTF8Pointable("euclidean_squared"); : private static final UTF8StringPointable MANHATTAN_FORMAT = : UTF8StringPointable.generateUTF8Pointable("manhattan distance"); : private static final UTF8StringPointable COSINE_FORMAT = UTF8StringPointable.generateUTF8Pointable("cosine"); : private static final UTF8StringPointable DOT_PRODUCT_FORMAT = UTF8StringPointable.generateUTF8Pointable("dot"); > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/bf94f040_05c5a388?usp=email : PS17, Line 99: private static final Map<Integer, DistanceFunction> DISTANCE_MAP = Map.of(MANHATTAN_FORMAT.hash(), : VectorDistanceArrCalculation::manhattan, EUCLIDEAN_DISTANCE.hash(), VectorDistanceArrCalculation::euclidean, : EUCLIDEAN_DISTANCE_L2.hash(), VectorDistanceArrCalculation::euclidean, EUCLIDEAN_DISTANCE_SQUARED.hash(), : VectorDistanceArrCalculation::euclidean_squared, EUCLIDEAN_DISTANCE_L2_SQUARED.hash(), : VectorDistanceArrCalculation::euclidean_squared, COSINE_FORMAT.hash(), VectorDistanceArrCalculation::cosine, : DOT_PRODUCT_FORMAT.hash(), VectorDistanceArrCalculation::dot); > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/42f516d2_68147172?usp=email : PS17, Line 116: 3 > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/cd7ec1e9_1ecc3368?usp=email : PS17, Line 176: listAccessor1 > Made the changes, will upload the new changes Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/980b9379_e6af2210?usp=email : PS17, Line 189: if(!isConstant[0]) { : vectorPool.free(primitiveArray1); : } : if(!isConstant[1]) { : vectorPool.free(primitiveArray2); : } > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/1d49bab6_6926be2b?usp=email : PS17, Line 237: return getValueFromTag(typeTag, data, offset); > i don't think that's true though, is it? i can have an array of [ int64(0), > double(0), "0"] and they […] Yes, acknowledged and is returning null 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/c486f368_8009fb7c?usp=email : PS19, Line 63: VectorDistanceArrScalarEvaluator > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/20df295d_6fd56e89?usp=email : PS19, Line 91: listAccessorConstant > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/2b033482_7a42fb73?usp=email : PS19, Line 113: if (!ATYPETAGDESERIALIZER.deserialize(pointables[i].getByteArray()[pointables[i].getStartOffset()]) : .isListType()) > Does this mean it is going to throw an exception if you pass a NULL/MISSING > constant arg? e.g. […] it return null now https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/a0f0028a_5b612ff3?usp=email : PS19, Line 140: listAccessor[i] = new ListAccessor(); > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/c698cbad_b7335b34?usp=email : PS19, Line 160: PointableHelper.setNull(result); > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/47a67733_78c4f9cf?usp=email : PS19, Line 190: result.set(resultStorage); > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/1d6da345_0b39b7fc?usp=email : PS19, Line 194: AMutableDouble aDouble = new AMutableDouble(-1); > Applied Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/c01f1b59_bc743822?usp=email : PS19, Line 203: IPointable tempVal = new VoidPointable(); : ArrayBackedValueStorage storage = new ArrayBackedValueStorage(); > Acknowledged Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/d1dd41b7_3d203356?usp=email : PS19, Line 212: extractNumericVector > Acknowledged and added Done https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/f408da28_f553cf80?usp=email : PS19, Line 221: DISTANCE_FN_MAP.get(func) > Acknowledged 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: 26 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: Fri, 05 Jun 2026 07:42:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Calvin Thomas Dani <[email protected]> Comment-In-Reply-To: Ian Maxon <[email protected]> Comment-In-Reply-To: Ali Alsuliman <[email protected]>
