You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/11/22 06:27:11 UTC

[jira] [Reopened] (PHOENIX-2424) Support multi-byte characters in CHAR data type

     [ https://issues.apache.org/jira/browse/PHOENIX-2424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Taylor reopened PHOENIX-2424:
-----------------------------------

> Support multi-byte characters in CHAR data type
> -----------------------------------------------
>
>                 Key: PHOENIX-2424
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2424
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.5.2
>         Environment: Sending Avatica requests to Phoenix 4.5.2 using Telerik Fiddler or any REST test tool
>            Reporter: Kevin Liew
>              Labels: char, phoenix, string
>
> Create a table with a character column (use the JDBC driver or bulk import tool)
> {noformat}
> DROP TABLE IF EXISTS SEN.WChar_Table;
> CREATE TABLE IF NOT EXISTS SEN.WChar_Table(
> 	KeyColumn VARCHAR(255) PRIMARY KEY,
> 	Column1 CHAR(100));
> {noformat}
> Upsert an unsupported character using Avatica wire protocol
> {noformat}
> request: {
>   "request": "prepareAndExecute",
>   "connectionId": "1ccf2934-7b9b-491b-7d37-17be44bc811E",
>   "sql": "UPSERT INTO SEN.WVARCHAR_TABLE(KeyColumn, Column1) VALUES('ConversionTestKey', '喂')",
>   "maxRowCount": -1
> }
> {noformat}
> We expect an error (as occurs when attempting to upsert into a CHAR column) but instead the upsert succeeds. So we query the inserted data and find that incorrect data was inserted at results.firstFrame.rows\[0\]
> {noformat}
> {
>   "response": "Service$ExecuteResponse",
>   "results": [
>     {
>       "response": "resultSet",
>       "connectionId": "1ccf2934-7b9b-491b-7d37-17be44bc811E",
>       "statementId": 592785849,
>       "ownStatement": true,
>       "signature": {
>         "columns": [
>           {
>             "ordinal": 0,
>             "autoIncrement": false,
>             "caseSensitive": false,
>             "searchable": true,
>             "currency": false,
>             "nullable": 1,
>             "signed": false,
>             "displaySize": 510,
>             "label": "COLUMN1",
>             "columnName": "COLUMN1",
>             "schemaName": "",
>             "precision": 510,
>             "scale": 0,
>             "tableName": "SEN.WVARCHAR_TABLE",
>             "catalogName": "",
>             "type": {
>               "type": "scalar",
>               "id": 12,
>               "name": "VARCHAR",
>               "rep": "STRING"
>             },
>             "readOnly": true,
>             "writable": false,
>             "definitelyWritable": false,
>             "columnClassName": "java.lang.String"
>           }
>         ],
>         "sql": null,
>         "parameters": [
>           
>         ],
>         "cursorFactory": {
>           "style": "LIST",
>           "clazz": null,
>           "fieldNames": null
>         }
>       },
>       "firstFrame": {
>         "offset": 0,
>         "done": true,
>         "rows": [
>           [
>             "喂"
>           ]
>         ]
>       },
>       "updateCount": -1
>     }
>   ]
> }
> {noformat}



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