MAPLOOKUP working in select clause but not in where clause
I am currently using Vertica Analytic Database v7.1.1-0. I have a column named impression which stores jsonObject as string eg-
select TO_CHAR(MAPLOOKUP(MapJSONExtractor(impression),'push.bannerID')) from "VIZVRM4485_ecsegmentation" where impression is not null;
select count(*) as "count" from "VIZVRM4485_ecsegmentation" where impression is not null
and TO_CHAR(MAPLOOKUP(MapJSONExtractor(impression),'push.bannerID')) like '%bb%'
Running MAPLOOKUP in query 1 gives me expected result but MAPLOOKUP in query2 gives error.
[Code: 5861, SQL State: VP001] [Vertica]VJDBC ERROR: Error calling processBlock() in User Function MapJSONExtractor at [src/JSONParser.cpp:958], error code: 0, message: Unrecoverable parse exception while processing partition: [Unrecoverable YAJL Error on record #  with status: [parse error] and  Bytes consumed: [lexical error: invalid char in json text.