Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Ensure that all Cassandra queries can run #73

Merged
merged 1 commit into from Jul 7, 2017
Merged

Conversation

c-w
Copy link
Contributor

@c-w c-w commented Jul 7, 2017

Implementation is terrible, but this is likely the best we can do with the current schema.

Copy link
Contributor

@jcjimenez jcjimenez left a comment

Choose a reason for hiding this comment

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

I think this will work as long as we have a very small number of records.

params.push(pipeline);
}

let query = `SELECT detectedkeywords FROM fortis.events WHERE ${clauses.join(' AND ')} ALLOW FILTERING`;
Copy link
Contributor

Choose a reason for hiding this comment

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

ALLOW FILTERING ouch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the schema right now requires us to do this :( We really have to formulate the v2 queries that we want and make sure that the DB schema supports them. Adding @erikschlegel for visibility.


const query = `SELECT * FROM fortis.events WHERE (${clauses.join(' AND ')})`;
const query = `SELECT * FROM fortis.events WHERE ${clauses.join(' AND ')} ALLOW FILTERING`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Another ouch. AFAIK, ALLOW FILTERING fetches everything and does driver-side filtering, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@c-w c-w merged commit cb44b1c into master Jul 7, 2017
@c-w c-w deleted the cassandra-limitations branch July 7, 2017 19:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants