Amrish Lal
01/31/2021, 5:34 AMselect actor from githubEvents limit 1
which produced the result:
{"id":18542751,"login":"LimeVista","display_login":"LimeVista","gravatar_id":"","url":"<https://api.github.com/users/LimeVista>","avatar_url":"<https://avatars.githubusercontent.com/u/18542751>?"}
then I tried to write a query using JSON_MATCH predicate to match the above row:
select actor from githubEvents WHERE JSON_MATCH(actor, 'login = ''LimeVista''')
and this produces an empty result set. I am wondering if I am missing anything or if the query above is incorrect?Sidd
01/31/2021, 6:18 AMAmrish Lal
01/31/2021, 9:00 PMselect count(*) from githubEvents WHERE JSON_MATCH(actor, 'login = ''LimeVista''')
produces empty result. I am wondering if there is an issue with Json index search here?
select json_extract_scalar(actor,'$.id', 'STRING')
from githubEvents limit 10 works and returns results.
select count(*) from githubEvents WHERE json_extract_scalar(actor,'$.id', 'STRING') = '18542751'
also worksAmrish Lal
01/31/2021, 9:20 PMKishore G
Amrish Lal
02/01/2021, 2:51 AMKishore G
Amrish Lal
02/03/2021, 4:25 AMAmrish Lal
02/03/2021, 4:32 AM