Skip to content

Threshold queries#14

Open
tomyyyD wants to merge 16 commits into
mainfrom
threshold_queries
Open

Threshold queries#14
tomyyyD wants to merge 16 commits into
mainfrom
threshold_queries

Conversation

@tomyyyD
Copy link
Copy Markdown
Contributor

@tomyyyD tomyyyD commented Jun 29, 2023

query any field based on a threshold input.

Comment thread src/rexdb.py Outdated
return success

@staticmethod
def int_cmp(x, y):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what is this intended to do?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't' believe we need this anymore

Copy link
Copy Markdown
Member

@thetazero thetazero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to change the get_data_at_field_threshold to something more like get_field_filtered(field, filter_fn)

@tomyyyD tomyyyD requested a review from thetazero July 21, 2023 13:31
@tomyyyD
Copy link
Copy Markdown
Contributor Author

tomyyyD commented Jul 24, 2023

closes #7

@thetazero thetazero linked an issue Jul 28, 2023 that may be closed by this pull request
Comment thread src/rexdb.py

return entries

def get_field_filtered(self,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thought, given our memory issues we probably want to require a limit on the number of entries you get back.
Otherwise calling get_field_filtered is pretty dangerous, you have no idea how much memory will be allocated in the worst case.

Copy link
Copy Markdown
Member

@thetazero thetazero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, seems really easy to work with now.

I think we should consider the memory impact carefully.

Comment thread src/rexdb.py Outdated
- 'a
- is the value that you want to compare the data to

goal:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want to clean up the docstring too, shoud be much shorter now atleast.

@tomyyyD tomyyyD requested a review from thetazero July 28, 2023 17:33
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

Successfully merging this pull request may close these issues.

Query based on any field and some value threshold

2 participants