>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 22:

(5 comments)

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/04e1a6e0_592012e4?usp=email
 :
PS17, Line 237: return getValueFromTag(typeTag, data, offset);
> From my understanding only dimensions is critical (that it should be the 
> same) , because Asterix in  […]
i don't think that's true though, is it? i can have an array of [ int64(0), 
double(0), "0"] and they all will be different types, right? currently it seems 
like what will happen is that value will be cast to Float.NaN. i think in these 
cases where the type is not numeric, we should return null or something. we 
should also be careful about bigint to double because there is a precision loss 
there.


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/cf6efde1_2acb6953?usp=email
 :
PS19, Line 160: PointableHelper.setNull(result);
> We typically return MISSING if there is any arg MISSING, then NULL if there 
> is any arg NULL which is […]
+1 to this comment


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/f6b082e0_06ac6a24?usp=email
 :
PS19, Line 194: AMutableDouble aDouble = new AMutableDouble(-1);
> Acknowledged
this doesn't seem to be applied


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/f9213679_a6c61314?usp=email
 :
PS19, Line 212: extractNumericVector
> I believe that we can simplify it to something like: […]
this is a good edit- i would take it


File 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/VectorDistanceArrCalculation.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20126/comment/4df69079_5eeb7670?usp=email
 :
PS22, Line 33:   if (a.length != b.length) {
             :             throw new IllegalArgumentException("Vectors must be 
of the same length");
             :         }
doing the length check here is probably not the right way to go about it. the 
caller should check. we definitely don't want to throw IllegalArgumentException 
or any other exception. the correct thing is to just return null if the length 
isn't the same, which could be done by the caller.



--
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: 22
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: Thu, 16 Apr 2026 19:52:20 +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]>

Reply via email to