phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1759) PhoenixArray to have decent .toString() implementation.
Date Fri, 24 Apr 2015 23:13:39 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-1759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14511985#comment-14511985
] 

ASF GitHub Bot commented on PHOENIX-1759:
-----------------------------------------

GitHub user 7shurik reopened 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 <awarshavsky@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 <awarshavsky@salesforce.com>
Date:   2015-04-15T19:30:32Z

    Add intergration test for array toString()

commit ca6243de97f4bc203278bd129a62e08ffea896f4
Author: Alex <awarshavsky@salesforce.com>
Date:   2015-04-15T23:03:07Z

    Integration test for PhoenixArray ResultSet.getString(), also sync PDataType to latest
trunk version.

commit 1be527d737cc1ade2e121202085c42106e2ad29a
Author: Alex <awarshavsky@salesforce.com>
Date:   2015-04-16T16:58:22Z

    Fix formatting, add more PVarcharArray tests.

commit fc47b68ee56e99e35cd0b96e836cb633df003993
Author: Alex <awarshavsky@salesforce.com>
Date:   2015-04-16T17:55:02Z

    Unify PhoenixArray.toString() to work for all types of arrays, remove other toString()
implementations. Also create toStringLiteral(Object) to use when there's no Formatter.

commit b6de356c0fc49c90a4263e6b36dd848c0fc368b9
Author: Alex <awarshavsky@salesforce.com>
Date:   2015-04-16T17:57:23Z

    Fix tabs=>spaces in PhoenixArray.toString()

commit 02a17c57fa18b74c8f97a11eb6446826a1e84b56
Author: Alex <awarshavsky@salesforce.com>
Date:   2015-04-17T22:45:15Z

    Merge branch 'master' into PHOENIX-1759

commit 9220dbb4854b9448802cc4361ade5c5c8470d401
Author: Alex <awarshavsky@salesforce.com>
Date:   2015-04-24T23:00:23Z

    Fix Apache license header (2=>2.0)

----


> 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
>             Fix For: 5.0.0, 4.4.0
>
>
> 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)

Mime
View raw message