From 2fd8ae45023bc225bdb2970581452a9c700555db Mon Sep 17 00:00:00 2001 From: Anton Yuzhaninov Date: Wed, 26 Jun 2019 11:25:40 +0100 Subject: [Rework] Do not lowercase all data send to ClickHouse A lot of strings stored in ClickHouse are case sensitive according to standards - store them in original case. We can always can use 'lower(field)' in a ClickHouse query, but if string was lowercased by Rspamd nothing can be done to recover lost information. Lowercase domain parts of addresses - domains are not case sensitive and storing them in lower case will simplify queries. --- lualib/lua_clickhouse.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lualib/lua_clickhouse.lua') diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua index ad5b51dce..4a57afd3f 100644 --- a/lualib/lua_clickhouse.lua +++ b/lualib/lua_clickhouse.lua @@ -49,7 +49,7 @@ local function clickhouse_quote(str) ['\\'] = [[\\]], ['\n'] = [[\n]], ['\t'] = [[\t]], - }):lower() + }) end return '' @@ -503,4 +503,4 @@ exports.generic_sync = function (upstream, settings, params, query) end end -return exports \ No newline at end of file +return exports -- cgit v1.2.3