Alex Levenson created PARQUET-32:
------------------------------------
Summary: Refactor the Statistics classes to match the specialized
pattern used throughout parquet
Key: PARQUET-32
URL: https://issues.apache.org/jira/browse/PARQUET-32
Project: Parquet
Issue Type: Improvement
Components: parquet-mr
Reporter: Alex Levenson
Priority: Minor
Because Parquet tries very hard to avoid autoboxing, most of the core classes
are specialized for each primitive by having a method for each type, eg:
{code}
void writeInt(int x);
void writeLong(long x);
void writeDouble(double x);
{code}
and so on.
However, the statistics classes take the other approach of having an
InstStatistics class, a LongStatistics class, a DoubleStatistics class and so
on. I think it's worth going for consistency and picking a pattern and sticking
to it. Seems like the first pattern I mentioned is currently the more common
one.
We may want to take this one step further and define an interface that these
all conform to, eg:
{code}
public interface ParquetTypeVisitor {
void visitInt(int x);
void visitLong(long x);
void visitDouble(double x);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)