Giter Club home page Giter Club logo

Comments (9)

hroptatyr avatar hroptatyr commented on July 23, 2024

I'm sorry but what is ds->readInterval(3, 30) supposed to do? I assumed it would give me data points written at time 3, 4, ..., 30. But it doesn't.

write 3000000 values...
write time: 1.8246
read all values...
got time 0
got time 1
got time 2
got time 3
got time 4
got time 5
got time 6
got time 7
got time 8
got time 9
got time 10
got time 11
got time 12
got time 13
got time 14
got time 15
got time 16
got time 17
got time 18
got time 19
got time 20
got time 21
got time 22
got time 23
got time 24
got time 25
got time 26
got time 27
got time 28
got time 29
got time 30

from nkvdb.

lysevi avatar lysevi commented on July 23, 2024

if you write measurement A1 exists in time T_0 and A2 in T_2, but you read in time T_1, you must get values of A1 because still exists in time T_1. if after them you write new value of A1 in time T_3 and read in time T_4, then you get A_1 with T_3 time

from nkvdb.

hroptatyr avatar hroptatyr commented on July 23, 2024

Exactly, that's why it's still broken. Your example writes a measurement at time 0, 1, 2, 3, ... Afterwards I'm interested in time 3, and you show me measurements from time 0, 1, and 2. That's just plain wrong.

from nkvdb.

lysevi avatar lysevi commented on July 23, 2024

you ar right.

from nkvdb.

lysevi avatar lysevi commented on July 23, 2024

just example.
you write meases to storage
{id=1,time=0},{id=1,time=1}{id=1,time=2}{id=1,time=3}{id=1,time=4}...{id=1,time=30}

you read from 3 to 30. What must storage return ?

from nkvdb.

hroptatyr avatar hroptatyr commented on July 23, 2024

Well at least
{id=1,time=3}{id=1,time=4}...{id=1,time=29}

about the item at time=30 you could argue that you want a half-open interval (from inclusive, to exclusive) so that you don't get the item twice if you query with readInterval(30, 60) in the next step, but that's up to you and should be documented somewhere somehow.

from nkvdb.

lysevi avatar lysevi commented on July 23, 2024

ok. if you write

{id=1,time=0},{id=2,time=1}{id=3,time=2}{id=4,time=3}{id=5,time=4}...{id=30,time=30}
you read from 3 to 30. What must storage return ?

from nkvdb.

hroptatyr avatar hroptatyr commented on July 23, 2024

All of them, correct.

from nkvdb.

lysevi avatar lysevi commented on July 23, 2024

a while, in case
{id=1,time=0},{id=1,time=1}{id=1,time=2}{id=1,time=3}{id=1,time=4}...{id=1,time=30}
storage return {id=1,time=2}{id=1,time=3}...{id=1,time=29}

in future, when i implement true indexes, you can customize the behavior of the readInterval

from nkvdb.

Related Issues (15)

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.