>From Ian Maxon <[email protected]>:

Attention is currently required from: Hongyu Shi.

Ian Maxon has posted comments on this change by Hongyu Shi. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099?usp=email )

Change subject: [ASTERIXDB-3754] Storage layer of VTree index - patch 1
......................................................................


Patch Set 2:

(10 comments)

File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/api/IVTreeDataFrame.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/236b0624_a7b29cd5?usp=email
 :
PS2, Line 67: void split(VTreeDataFrame rightFrame, ITupleReference tuple, int 
insertIndex) throws HyracksDataException;
            :
            :     int findInsertPosition(double distance) throws 
HyracksDataException;
javadoc might be nice for these


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/api/IVTreeDistanceFunction.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/f18a61a7_b7522338?usp=email
 :
PS2, Line 25: from AsterixDB to Hyracks modules
```suggestion
 * This interface allows Hyracks applications to define the distance function 
for the index
```


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/api/IVTreeInteriorFrame.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/69ddef4b_87ea2f24?usp=email
 :
PS2, Line 74: void setOverflowFlagBit(boolean overflowFlag);
            :
            :     boolean getOverflowFlagBit();
how's the overflow stuff work again? can't remember


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/frames/VTreeDataFrameFactory.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/b440e58e_73a251b9?usp=email
 :
PS2, Line 28: cosine
it's not necessarily cosine, is it?


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/frames/VTreeMetadataFrame.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/a645a5a2_1c83fe1a?usp=email
 :
PS2, Line 73:        // Binary search for the appropriate metadata entry
            :         for (int i = 0; i < tupleCount; i++) {
            :             frameTuple.resetByTupleIndex(this, i);
            :             double maxDistance = getMaxDistance(i);
            :
            :             if (distance <= maxDistance) {
            :                 return getDataPagePointer(i);
            :             }
            :         }
            :
unless i'm missing something, this isn't binary search?


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTreeBulkLoader.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/f912188d_fd9483bf?usp=email
 :
PS2, Line 463: TreeMap<Integer, ICachedPage> staticPages = new TreeMap<>();
how many pages is the static structure usually again?


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/1c6f10d1_96b0d02a?usp=email
 :
PS2, Line 468: ICachedPage page = bufferCache.confiscatePage(dpid);
there's no way to confiscate only 1 or 2 pages at a time? you have to 
confiscate the entire structure?


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTreeFlushLoader.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/64b34fc8_b4553b76?usp=email
 :
PS2, Line 142:          ICachedPage page = bufferCache.confiscatePage(dpid);
again here about confiscating the entire structure versus some fixed number of 
pages at a time


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/impls/VTreeStaticStructureBuilder.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/5635c787_96789272?usp=email
 :
PS2, Line 475: /**
             :      * Only gets called when everything is done.
             :      */
nit: comments are fine but i don't care much for obvious ones like this


File 
hyracks-fullstack/hyracks/hyracks-storage-am-vtree/src/main/java/org/apache/hyracks/storage/am/vector/utils/VectorDistanceUtils.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099/comment/7e015654_c914bffc?usp=email
 :
PS2, Line 29: DistanceMetric
how does this work with the interface that lets you specify the vector distance 
function from the application level (i.e. asterix)? or is this just for 
tests/pure hyracks?



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21099?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: Id613553fb11bf97ca9c75ae843dee470acc36b5d
Gerrit-Change-Number: 21099
Gerrit-PatchSet: 2
Gerrit-Owner: Hongyu Shi <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-CC: Ian Maxon <[email protected]>
Gerrit-Attention: Hongyu Shi <[email protected]>
Gerrit-Comment-Date: Thu, 07 May 2026 23:48:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to