[
https://issues.apache.org/jira/browse/PHOENIX-1872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499026#comment-14499026
]
ASF GitHub Bot commented on PHOENIX-1872:
-----------------------------------------
GitHub user 7shurik opened a pull request:
https://github.com/apache/phoenix/pull/70
JIRA Phoenix 1872
I'm fixing https://issues.apache.org/jira/browse/PHOENIX-1872. The fix is
to use PrimitiveBooleanArray of boolean[] instead of PhoenixArray of Boolean[].
I considered using BitSet and not sure we'd get the benefit vs. using
boolean[]. Also the code is much easier to maintain.
I've ran and fixed unit tests and appropriate integration tests as well.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/7shurik/phoenix PHOENIX-1872
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/phoenix/pull/70.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 #70
----
commit 9b6a4f049f084edb4d3fb03c960eb37b24d120b2
Author: Alex <[email protected]>
Date: 2015-04-15T19:19:08Z
JIRA PHOENIX-1759 - Fix implementation of PhoenixArray toString(). Includes
both object and primitive arrays.
commit 0fb879e74a3dc55211046c96f30a054a5aeacb67
Author: Alex <[email protected]>
Date: 2015-04-15T19:30:32Z
Add intergration test for array toString()
commit ca6243de97f4bc203278bd129a62e08ffea896f4
Author: Alex <[email protected]>
Date: 2015-04-15T23:03:07Z
Integration test for PhoenixArray ResultSet.getString(), also sync
PDataType to latest trunk version.
commit 1be527d737cc1ade2e121202085c42106e2ad29a
Author: Alex <[email protected]>
Date: 2015-04-16T16:58:22Z
Fix formatting, add more PVarcharArray tests.
commit fc47b68ee56e99e35cd0b96e836cb633df003993
Author: Alex <[email protected]>
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 <[email protected]>
Date: 2015-04-16T17:57:23Z
Fix tabs=>spaces in PhoenixArray.toString()
commit 7b1081cad4ba64f287936a3d237483fd38484e4a
Author: Alex <[email protected]>
Date: 2015-04-17T00:06:33Z
Use PrimitiveBooleanArray of boolean[] instead of PhoenixArray of Boolean[]
----
> Support PrimitiveBooleanPhoenixArray when creating PhoenixArray from Boolean[]
> ------------------------------------------------------------------------------
>
> Key: PHOENIX-1872
> URL: https://issues.apache.org/jira/browse/PHOENIX-1872
> Project: Phoenix
> Issue Type: Bug
> Reporter: Alex Warshavsky
> Assignee: Alex Warshavsky
> Priority: Minor
> Labels: newbie
>
> Currently, when phoenix array is created from a boolean array, PhoenixArray
> in instantiated instead of PrimitiveBooleanPhoenixArray.
> PArrayDataType.instantiatePhoenixArray(type, Boolean[] \{true, false});
> Other scalar/primitive types implement PhoenixArrayFactory to take advantage
> of primitive arrays. E.g.
> PArrayDataType.instantiatePhoenixArray(type, Integer[] \{1,2});
> returns PrimitiveIntPhoenixArray.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)