You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/04/16 01:07:59 UTC
[jira] [Commented] (PHOENIX-1759) PhoenixArray to have decent
.toString() implementation.
[ https://issues.apache.org/jira/browse/PHOENIX-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497258#comment-14497258 ]
ASF GitHub Bot commented on PHOENIX-1759:
-----------------------------------------
GitHub user 7shurik opened a pull request:
https://github.com/apache/phoenix/pull/68
Phoenix 1759
This is a fix for https://issues.apache.org/jira/browse/PHOENIX-1759. There's a set of unit tests as well as an integration test.
Main code change is adding a PhoenixArray.toString() implementation and toString on each primitive array type. There're also a couple of fixes for toStringLiteral not to barf on nulls.
Please let me know if you see any problems.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/7shurik/phoenix PHOENIX-1759
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/phoenix/pull/68.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #68
----
commit 9b6a4f049f084edb4d3fb03c960eb37b24d120b2
Author: Alex <aw...@salesforce.com>
Date: 2015-04-15T19:19:08Z
JIRA PHOENIX-1759 - Fix implementation of PhoenixArray toString(). Includes both object and primitive arrays.
commit 0fb879e74a3dc55211046c96f30a054a5aeacb67
Author: Alex <aw...@salesforce.com>
Date: 2015-04-15T19:30:32Z
Add intergration test for array toString()
commit ca6243de97f4bc203278bd129a62e08ffea896f4
Author: Alex <aw...@salesforce.com>
Date: 2015-04-15T23:03:07Z
Integration test for PhoenixArray ResultSet.getString(), also sync PDataType to latest trunk version.
----
> PhoenixArray to have decent .toString() implementation.
> -------------------------------------------------------
>
> Key: PHOENIX-1759
> URL: https://issues.apache.org/jira/browse/PHOENIX-1759
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Serhiy Bilousov
> Assignee: Alex Warshavsky
> Priority: Minor
> Labels: Newbie
>
> In sqlline when query TABLE or VIEW with ARRAY[] datatype it shows long string as value for the ARRAY[] column:
> {code}
> org.apache.phoenix.schema.types.PhoenixArray$PrimitiveIntPhoenixArray@d338d
> {code}
> We getting the string like this because sqlline calls ResultSet.getString() on the array column.
> Even thou it more of an issue in sqlline than in PHOENIX, as the value that is returned is a valid JDBC Array, adding a decent toString implementation in PhoenixArray (or each of its subclasses) would allow user to see something like \[ 1,2,3,555,666 \] of what we see now.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)