I have a problem with my UDF lua file when I trying to compare 2 strings(one from record and another one from arguments). If I declare 2 variables and compare it I will get true as a result, but when I want to compare for example record[key] == value(where key and value are received as arguments, I get false)
From the info() when I are 2 identical strings, result of comparison is false.
Thank you very much
Here is my code:
local function my_email_filter(key, value) return function(record) info('RESULT is %s and %s', record[key] == value ) info('%s | %s', record[key], value) if record[key] == value then return true else return false end end end local function mapper(record) local out = map() out['email'] = record['email'] out['userId'] = record['userId'] return out end function count(stream, key, email) local myfilter = my_email_filter(key, email) return stream : filter(myfilter) : map(mapper) end