'Avoid scientific notation for long type with S3 select and Java SDK

Using Java SDK 1.12 I read the content of a parquet file using SelectObjectContentRequest. I get a JSON string like this

{"myValue":1234567890123456000e0}

myValue is a long type but it is shown in scientific notation.

I get the JSON with

SelectObjectContentResult result = selectObjectContent...
String json = new BufferedReader(new InputStreamReader(result.getPayload().getRecordsInputStream(), StandardCharsets.UTF_8)).readLine();
// json value is "{\"myValue\":1234567890123456000e0}"

When I perform same query (select * from s3object s) via AWS Console, I get a plain representation for both CSV and JSON format (1234567890123456000 without ending e0). Is there a way to force SelectObjectContentRequest to return a plain format for long type values?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source