Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.0-incubating
Description
Create a table
CREATE TABLE IF DECIMAL_TABLE( keycolumn VARCHAR(255) PRIMARY KEY, column1 DECIMAL(38,0));
Prepare a parameterized statement
request:{"request":"prepare","connectionId":"3c39adc2-d13d-f87a-a63f-4ac6fbaf7CE8","sql":"select * from decimal_table where column1 > ? ","maxRowCount":"-1"}
{"response":"prepare","statement":{"connectionId":"3c39adc2-d13d-f87a-a63f-4ac6fbaf7CE8","id":1891923767,"signature":{"columns":[{"ordinal":0,"autoIncrement":false,"caseSensitive":false,"searchable":true,"currency":false,"nullable":0,"signed":false,"displaySize":255,"label":"KEYCOLUMN","columnName":"KEYCOLUMN","schemaName":"","precision":255,"scale":0,"tableName":"DECIMAL_TABLE","catalogName":"","type":{"type":"scalar","id":12,"name":"VARCHAR","rep":"STRING"},"readOnly":true,"writable":false,"definitelyWritable":false,"columnClassName":"java.lang.String"},{"ordinal":1,"autoIncrement":false,"caseSensitive":false,"searchable":true,"currency":false,"nullable":1,"signed":true,"displaySize":38,"label":"COLUMN1","columnName":"COLUMN1","schemaName":"","precision":38,"scale":0,"tableName":"DECIMAL_TABLE","catalogName":"","type":{"type":"scalar","id":3,"name":"DECIMAL","rep":"OBJECT"},"readOnly":true,"writable":false,"definitelyWritable":false,"columnClassName":"java.math.BigDecimal"}],"sql":"select * from decimal_table where column1 > ? ","parameters":[{"signed":false,"precision":0,"scale":0,"parameterType":3,"typeName":"DECIMAL","className":"java.math.BigDecimal","name":"?1"}],"cursorFactory":{"style":"LIST","clazz":null,"fieldNames":null}}}}
The precision and scale are always returned as '0'.
"parameters":[{"signed":false, "precision":0, "scale":0 ,"parameterType":3,"typeName":"DECIMAL","className":"java.math.BigDecimal","name":"?1"}],"cursorFactory":{"style":"LIST","clazz":null,"fieldNames":null}}}}
Attachments
Issue Links
- is cloned by
-
PHOENIX-2046 Metadata for queries returns wrong precision and scale
- Resolved