Skip to content

Commit

Permalink
#989 applying sql filter on the virutalised table using ignite example
Browse files Browse the repository at this point in the history
  • Loading branch information
naleeha authored and chrisjstevo committed Jan 23, 2024
1 parent fb2ca7d commit e8d124b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class IgniteOrderStore(private val parentOrderCache: IgniteCache[Int, ParentOrde
counter += 1
})

logger.info(s"Loaded Ignite ChildOrder for $counter rows, from index : $startIndex")
logger.info(s"Loaded Ignite ChildOrder for $counter rows, from index : $startIndex where $whereClause")

buffer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ class IgniteOrderDataProvider(final val igniteStore: IgniteOrderStore)(implicit
internalTable.setRange(VirtualizedRange(range.from, range.to))


// val sqlFilterClause =
// if (viewPort.filterSpec.filter == null || viewPort.filterSpec.filter.isEmpty) {
// ""
// }
// else {
// val filterTreeVisitor = new IgniteSqlFilterTreeVisitor
// val clause = FilterSpecParser.parse[IgniteSqlFilterClause](viewPort.filterSpec.filter, filterTreeVisitor)
// clause.toSql()
// }

val sqlFilterClause = ""
val sqlFilterClause =
if (viewPort.filterSpec.filter == null || viewPort.filterSpec.filter.isEmpty) {
""
}
else {
val filterTreeVisitor = new IgniteSqlFilterTreeVisitor
val clause = FilterSpecParser.parse[IgniteSqlFilterClause](viewPort.filterSpec.filter, filterTreeVisitor)
clause.toSql()
}

// val sqlFilterClause = ""

val rowCount = if(range.to > range.from) range.to - range.from else 1
val iterator = igniteStore.findChildOrder(sqlFilterClause = sqlFilterClause, startIndex = range.from, rowCount = rowCount)
Expand Down

0 comments on commit e8d124b

Please sign in to comment.