Skip to content

Commit

Permalink
Add comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Nov 23, 2020
1 parent cef4b55 commit dbc986f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ class SubExprEvaluationRuntime(cacheMaxEntries: Int) {
val proxy = ExpressionProxy(expr, proxyExpressionCurrentId, this)
proxyExpressionCurrentId += 1

// We leverage `IdentityHashMap` so we compare expression keys by reference here.
// So for example if there are one group of common exprs like Seq(common expr 1,
// common expr2, ..., common expr n), we will insert into `proxyMap` some key/value
// pairs like Map(common expr 1 -> proxy(common expr 1), ...,
// common expr n -> proxy(common expr 1)).
e.map(proxyMap.put(_, proxy))
}

Expand Down

0 comments on commit dbc986f

Please sign in to comment.