Hi, I'm trying to query json like done <here>, i.e...
# troubleshooting
w
Hi, I'm trying to query json like done here, i.e. without using functions. I have a JSON column with a json index on it, and I ingest it using a
jsonFormat
ingestion transform. When I select the column it shows the json as a string, but when I try to select things like
json_column[0].name
it returns empty. Anyone know the issue? Thanks in advance!
m
@Jackie ^^
j
Could you please post the entire query? Json index won't be applied to expressions in the SELECT clause, and you should use
jsonExtractScalar
for that
w
Copy code
select json_column[0].name from table_with_json_column
@Jackie ^
okay I thought with Pinot 0.8.0 / the new JSON column type maybe I wouldn't have to use any transformation functions. From the doc I linked https://docs.pinot.apache.org/users/user-guide-query/json-queries they don't?
j
Let's first try the original one and see if it works
w
@Jackie Yes it does
j
I think I found the issue. The array access is not properly handled. Can you please file an issue about this?
w
@Jackie Thanks for following up, done here! https://github.com/apache/pinot/issues/7504
👍 1