Description
In SqlFunctions the toString function with BigDecimal type will replace 0.1 with .1 .
But why is this ?
public static String toString(BigDecimal x) { final String s = x.toString(); if (s.equals("0")) { return s; } else if (s.startsWith("0.")) { // we want ".1" not "0.1" return s.substring(1); } else if (s.startsWith("-0.")) { // we want "-.1" not "-0.1" return "-" + s.substring(2); } else {
Attachments
Issue Links
- duplicates
-
CALCITE-2980 Implement the FORMAT clause of the CAST operator
- Closed