Details
Description
Case | Statement | Yields |
In range | request: { "request": "prepareAndExecute", "connectionId": "29770bfd-c923-712e-40b3-b097d4348A2F", "sql": "UPSERT INTO SEN.FLOAT_TABLE(KeyColumn, Column1) VALUES('ConversionTestKey',3.402823466e+37)", "maxRowCount": -1 } |
{ "response": "Service$ExecuteResponse", "results": [ { "response": "resultSet", "connectionId": "29770bfd-c923-712e-40b3-b097d4348A2F", "statementId": 259804592, "ownStatement": false, "signature": null, "firstFrame": null, "updateCount": 1 } ] } |
Out of range | request: { "request": "prepareAndExecute", "connectionId": "29770bfd-c923-712e-40b3-b097d4348A2F", "sql": "UPSERT INTO SEN.FLOAT_TABLE(KeyColumn, Column1) VALUES('ConversionTestKey',3.402823466e+39)", "maxRowCount": -1 } |
HTTP/1.1 500 org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type mismatch. FLOAT and DOUBLE for 3.402823466E39 Date: Thu, 12 Nov 2015 22:04:44 GMT Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html; charset=ISO-8859-1 Content-Length: 387 Connection: close Server: Jetty(9.2.z-SNAPSHOT) <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 </title> </head> <body> <h2>HTTP ERROR: 500</h2> <p>Problem accessing /. Reason: <pre> org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type mismatch. FLOAT and DOUBLE for 3.402823466E39</pre></p> <hr /><i><small>Powered by Jetty://</small></i> </body> </html> |
Out of range 2 | request: {"request":"prepareAndExecute","connectionId":"29770bfd-c923-712e-40b3-b097d4348A2F","sql":"UPSERT INTO SEN.FLOAT_TABLE(KeyColumn, Column1) VALUES('ConversionTestKey',2.2250738585072014e-308)","maxRowCount":-1} |
{"response":"Service$ExecuteResponse","results":[{"response":"resultSet","connectionId":"29770bfd-c923-712e-40b3-b097d4348A2F","statementId":1020495346,"ownStatement":false,"signature":null,"firstFrame":null,"updateCount":1}]} |
The three cases differ only in the value being upserted for Column1. In the last case, ('ConversionTestKey', 0) is inserted whereas an error should be reported