microsoft / ALEX

A library for building an in-memory, Adaptive Learned indEX
MIT License
662 stars 114 forks source link

expand_root: some new_children pointers are not assigned #26

Open arcsinY opened 2 years ago

arcsinY commented 2 years ago

Hi,

In function "expand_root" (alex.h), you use two variables named "in_bounds_new_nodes_start" and "in_bounds_new_nodesend" to control the boundary of "root->children". So some elements in "root->children_" will not be assigned to a pointers. However, in function "expand" (alexnodes.h), all elements of "children" of a model node will be traversed, and then it will visit null pointers.

Is is right? It seems that we should check whether a elements of "children_" is null when we expand a model node.

Thank you