Skip to content

use max function to improve csql performance #241

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pjfanning
Copy link
Contributor

@pjfanning pjfanning commented Oct 28, 2024

The max function requires a min of Cassandra 2.2 and we can release note that. https://en.wikipedia.org/wiki/Apache_Cassandra (2.2 was released in 2015)

@pjfanning pjfanning added this to the 1.1.0 milestone Oct 28, 2024
@pjfanning
Copy link
Contributor Author

Looks like this is not going to work:

java.lang.IllegalArgumentException: sequence_nr is not a column in this row
	at com.datastax.oss.driver.internal.core.cql.DefaultRow.firstIndexOf(DefaultRow.java:112)
	at com.datastax.oss.driver.api.core.data.GettableByName.getLong(GettableByName.java:312)
	at org.apache.pekko.persistence.cassandra.journal.CassandraJournal.find$1$$anonfun$2$$anonfun$1(CassandraJournal.scala:687)
	at scala.Option.map(Option.scala:242)
	at org.apache.pekko.persistence.cassandra.journal.CassandraJournal.find$1$$anonfun$2(CassandraJournal.scala:687)

@pjfanning pjfanning closed this Oct 28, 2024
@pjfanning pjfanning reopened this Oct 28, 2024
@pjfanning
Copy link
Contributor Author

Looks like this is not going to work:

java.lang.IllegalArgumentException: sequence_nr is not a column in this row
	at com.datastax.oss.driver.internal.core.cql.DefaultRow.firstIndexOf(DefaultRow.java:112)
	at com.datastax.oss.driver.api.core.data.GettableByName.getLong(GettableByName.java:312)
	at org.apache.pekko.persistence.cassandra.journal.CassandraJournal.find$1$$anonfun$2$$anonfun$1(CassandraJournal.scala:687)
	at scala.Option.map(Option.scala:242)
	at org.apache.pekko.persistence.cassandra.journal.CassandraJournal.find$1$$anonfun$2(CassandraJournal.scala:687)

I think I have a fix for this

@pjfanning pjfanning changed the title try to use max function to improve csql performance use max function to improve csql performance Oct 28, 2024
@pjfanning pjfanning marked this pull request as draft October 29, 2024 13:09
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.

1 participant