Making progress, saw an error profiling a table wi...
# troubleshoot
m
Making progress, saw an error profiling a table with a JSON data type (POSTGRES 13) column. Is this a known issue?
Copy code
'HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.\n'
The associated SQL Statement:
Copy code
'(SELECT count(*) AS element_count, sum(CASE WHEN (offer_set IN (NULL) OR offer_set IS NULL) THEN %(param_11)s ELSE %(param_12)s END) '
           'AS null_count \n'
Also, this statement seems a bit non-sensical. checking for offer_set in (NULL) or offer_set IS NULL) ?? Both of these tests do the same thing right?? Wouldn’t we want to pick one test? Why do both? Am I missing something??
b
Hi Charles - These are queries generated by the underlying library Great Expectations to compute the NULL count. Agree this should just be
WHEN offer_set IS NULL
Is the first piece an error or a warning?
m
That is an error. It is basically saying the query tried to make a comparison with a data type which does not support the comparison operator in question. I think this means that special handling is needed for JSON data types in Postgres. Hopefully the profiling software would simply do the right thing rather than adding a burden to the user.
b
You'd certainly hope! But this is software.. what can break will break🙂