Search code examples
apache-drill

How to disable scientific notation in Apache Drill API response


When decimal/double number becomes too long, Drill automatically sends it in scientific notation (1.2345E6). This quite complicates parsing the result at the other end.

Only HTTP API returns this form. Results from JDBC are OK.

Is there any way to disable this behavior?


Solution

  • AFAIK, there is no way to disable scientific notation, but you can use UDFs which convert decimal/double results to varchar in the desired format, for example, to_char UDF does similar things.