Open PredatorVI opened 16 hours ago
Upon further investigation, it isn't related to CAST(). If I simply call SELECT doc FROM ... , the riskgroup name is also returned as all lowercase in the resulting string:
riskgroups = {
0 = 0,
30 = 2
}
What connector are you using? How did you create the table? Please share the entire steps to reproduce.
We are currently using Trino version v445 in Google Kubernetes Engine to query a large set of JSON documents. One of the many fields in the original source are named using camel case such as:
and can be queried using the original camel case name just fine such as SELECT doc.riskGroups FROM ...
However if I do SELECT doc FROM .... the resulting value for this field looks like:
I'm specifically calling CAST(doc AS JSON) in order to convert the resulting JSON string to a Java POJO and the Jackson ObjectMapper() call subsequently fails because the field/property name does not match. Is there a way to tell Trino to maintain the case of the original? It seems like an issue if the query result is changing the original data as a side effect.
(Edited to reflect that the case conversion isn't specific to the CAST() call I was using.)