Skip to content

Commit

Permalink
return empty map of lucene expressions of select is done against syst…
Browse files Browse the repository at this point in the history
…em_views table
  • Loading branch information
smiklosovic committed Sep 7, 2023
1 parent 2b0b37d commit 994f470
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ class IndexQueryHandler extends QueryHandler with Logging {
def luceneExpressions(
select: SelectStatement,
options: QueryOptions): Map[Expression, Index] = {
val map = mutable.LinkedHashMap.empty[Expression, Index]
val expressions = select.getRowFilter(options).getExpressions

if (select.keyspace() == "system_virtual_schema") {
val keyspaceOfSelect = select.keyspace()
if (keyspaceOfSelect == "system_virtual_schema" || keyspaceOfSelect == "system_views") {
return Map.empty
}

val map = mutable.LinkedHashMap.empty[Expression, Index]
val expressions = select.getRowFilter(options).getExpressions

val cfs = Keyspace.open(select.keyspace).getColumnFamilyStore(select.table.id)
val indexes = cfs.indexManager.listIndexes.asScala.collect { case index: Index => index }
expressions.forEach {
Expand Down

0 comments on commit 994f470

Please sign in to comment.