| 68 | } |
| 69 | |
| 70 | void UpdateUniquifier(const std::string& expr) { |
| 71 | if (uniquifier_ == 0) { |
| 72 | // caching of expressions with re2 patterns causes lock contention. So, use |
| 73 | // multiple instances to reduce contention. |
| 74 | if (expr.find(" like(") != std::string::npos) { |
| 75 | uniquifier_ = std::hash<std::thread::id>()(std::this_thread::get_id()) % 16; |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | size_t Hash() const { return hash_code_; } |
| 81 |