Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
It appears the metadata for the SIGN function in Calcite is incorrect, it uses the input metadata as the output metadata.
SqlStdOperatorTable.java#L1713
This works in most cases but for Decimal where prec=scale, this doesn’t work since there can be no whole digits. The return metadata should really be an int, or if you want to match types then DECIMAL(1, 0) if the input metadata is any DECIMAL.
Attachments
Issue Links
- links to