phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Liew (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-2318) Parameter precision and scale are not returned using Avatica REST API
Date Fri, 09 Oct 2015 21:59:05 GMT
Kevin Liew created PHOENIX-2318:
-----------------------------------

             Summary: Parameter precision and scale are not returned using Avatica REST API
                 Key: PHOENIX-2318
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2318
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.5.2
            Reporter: Kevin Liew


Create a table
{noformat}
CREATE TABLE IF DECIMAL_TABLE(
keycolumn VARCHAR(255) PRIMARY KEY,
column1 DECIMAL(38,0));
{noformat}

Prepare a parameterized statement
{noformat}
request:{"request":"prepare","connectionId":"3c39adc2-d13d-f87a-a63f-4ac6fbaf7CE8","sql":"select
* from decimal_table where column1 > ? ","maxRowCount":"-1"}
{noformat}

{noformat}
{"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}}}}
{noformat}
The precision and scale are always returned as '0'.
{noformat}
"parameters":[{"signed":false, "precision":0, "scale":0 ,"parameterType":3,"typeName":"DECIMAL","className":"java.math.BigDecimal","name":"?1"}],"cursorFactory":{"style":"LIST","clazz":null,"fieldNames":null}}}}{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message