[
https://issues.apache.org/jira/browse/ARROW-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191791#comment-16191791
]
ASF GitHub Bot commented on ARROW-1473:
---------------------------------------
GitHub user siddharthteotia opened a pull request:
https://github.com/apache/arrow/pull/1164
ARROW-1473: [JAVA] initial prototype hierarchy
cc @jacques-n , @BryanCutler , @icexelloss , @elahrvivaz
**BaseFixedWidthVector abstract class** - can be extended with a template
to generate all the fixed width vector types.
**FixedValueVectorsPrototype.java** - template similar to what we have
currently in FixedValueVectors.java . However, all the common functionality has
been moved from the template to BaseFixedWidthVector. So the template pretty
much contains the custom mutator and accessor methods which are extremely
complex as there is no partial approach to refactor them.
This is why I was suggesting that we should try to get rid of template for
fixed value vectors.
Another approach could be to use the template for simple types like INT,
FLOAT4, FLOAT8 since the "if" conditions in template code are probably not very
complicated for these types. But for types like TIMESTAMP and others, there are
giant "if" blocks.
**PrototypeIntVectorNonCodegen** - Non code generated IntVector class that
implements IntVector specific functionality by extending BaseFixedWidthVector.
The get() functions in the Accessor bypass ArrowBuf and directly work with the
memory address to fish out the value.
**BaseVariableWidthVector** abstract class - looking at the code of
VarCharVector and VarBinaryVector, it seems like the code is 95% same with only
1 or 2 accessor functions being different. So we can implement all the
functionality (including mutator and accessor as well) in the base class and
then have small non code generated subclasses that just have the specific
functionality for VarChar and VarBinary. We will no longer need
VariableLengthVectors.java template.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/siddharthteotia/arrow ARROW-1473
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/arrow/pull/1164.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 #1164
----
----
> [JAVA] Create Prototype Code Hierarchy (alt A)
> ----------------------------------------------
>
> Key: ARROW-1473
> URL: https://issues.apache.org/jira/browse/ARROW-1473
> Project: Apache Arrow
> Issue Type: Sub-task
> Reporter: Jacques Nadeau
> Labels: pull-request-available
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)