Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address comments
Signed-off-by: Terence Lim <terencelimxp@gmail.com>
  • Loading branch information
terryyylim committed May 7, 2021
commit f72de527253c98c09391753c69af1257ed7a1f86
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ object StringUtils {
}

def trimAndHash(expr: String, maxLength: Int): String = {
val maxPrefixLength = 40
// Length 8 suffix as derived from murmurhash_32 implementation
val maxPrefixLength = maxLength - 8
if (expr.length > maxLength)
expr
.take(maxPrefixLength)
Expand Down