Coder Social home page Coder Social logo

Comments (3)

yangzq50 avatar yangzq50 commented on May 21, 2024

My proposal for the implementation:

  1. When building secondary index for a numeric column in the table, we can build one secondary index structure for each segment of the table.

  2. Every secondary index structure should contain 3 parts:
    2.1. pgm: a data structure which provides approximate range
    2.2. vector_value: sorted array of all the values of the chosen column in the segment (necessary for getting exact range)
    2.3. vector_offset: array of segment offsets for each value in vector_value (necessary for getting filtering results)

  3. vector_value and vector_offset can be split into parts with max size DEFAULT_BLOCK_CAPACITY

  4. Steps for range search of one column with secondary index:
    4.1. Get an approximate range from pgm
    4.2. Get the exact range by binary search in vector_value
    4.3. Generate a bitmask (when the size of the exact range is too big) or a vector of chosen offsets

from infinity.

yingfeng avatar yingfeng commented on May 21, 2024

4.2 is not necessary because pgm has already told the approximate range, as a result 4.2 is acturally a linear scan

4. Steps for range search of one column with secondary index:
   4.1. Get an approximate range from pgm
   4.2. Get the exact range by binary search in vector_value
   4.3. Generate a bitmask (when the size of the exact range is too big) or a vector of chosen offsets

from infinity.

yangzq50 avatar yangzq50 commented on May 21, 2024

subtask #476 and subtask #477 are deferred to #637

from infinity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.