Following is the Druid sql query and I am trying to apply LATEST aggregation function on Json type customMetadata object
Select sid,
LATEST(JSON_QUERY("customMetadata", '$'), 1000) as "test"
from xyz
where 1=1
group by sid
limit 1
output:
sid = 1
test = StructuredData{value={supportedAbi=armeabi-v7a}}
Expected output
sid = 1
test = {"supportedAbi":"armeabi-v7a"}
Following is second query where I am just trying to read specific param under that JSON object and applying LATEST over it. That scenario is working fine and none of the additional string getting added there
Select sid,
LATEST(JSON_VALUE("customMetadata", '$.supportedAbi'), 1000.000000) as "test"
from xyz
where 1=1
group by sid
limit 1
Output
sid=1
test = armeabi-v7a
I wanted to know why Druid is appending "StructuredData{value=" in first scenario, Any suggestion on how can we avoid that?