Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monkey-patch timestream's filters for range/ltrim/rtrim #2

Open
brycebaril opened this issue Nov 12, 2013 · 3 comments
Open

Monkey-patch timestream's filters for range/ltrim/rtrim #2

brycebaril opened this issue Nov 12, 2013 · 3 comments

Comments

@brycebaril
Copy link
Owner

The filters, especially range filters should be monkeypatched from timestream such that instead of doing a full stream they set gte/lte range settings for the stream at the level-version level.

This should make a big difference for subset ranges.

@aredridel
Copy link
Contributor

#4 might be an alternative to this.

@brycebaril
Copy link
Owner Author

@aredridel I think that's a great start (merged 👍 ) and could be used to make something like:

db.ts('data').range(start, end)

Would automatically do

db.ts('data', {minVersion: start, maxVersion: end})

I'm still keen on working on query optimizers for the filters though. One example where this could be useful is a saved query could be later limited via a range() and still optimized, e.g.

function hourlyHitStream(db) {
  return db.ts('metrics').keep('hits').mean('h')
}

hourlyHitStream(db).range(start, end)

Could definitely work around this though by structuring the example differently and passing a timestream that's already got a minVersion/maxVersion.

At the very least we still should add query optimizers for things like:

db.ts('data').rtrim(100)
db.ts('data').ltrim(100)

@aredridel
Copy link
Contributor

Heck yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants