Retain long data type value in SQL output

hi,

I am trying to get min value of an attribute using SQL api. My query looks like this
SELECT MIN(attr1) as min_val from index_name

However, in the output, the value is getting converted to scientific value and is loosing precision. Its showing value as 1.0E18.

Is there any way to retain the value as is? I tried using both variants of CONVERT/CAST on top of MIN. I am getting input mismatch, input '(' expecting ')'.

I am on ES7.2.0 default installation using Windows MSI.

Thanks!

That should not happen and on a quick test with a new 7.2.0 deployment is does not indeed happen.

Are you seeing this 1.0E18 in the REST answer, or is this answer being interpreted by another application that renders it to you?

If you're using the REST API directly, could you share the URL starting from the path (/_sql) and the REST request object being sent to the SQL REST API?
The attr1 source of the document that contains the minimum value would also be useful.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.