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

ASF GitHub Bot commented on ORC-184:
------------------------------------

Github user wgtmac commented on the issue:

    https://github.com/apache/orc/pull/120
  
    On Java side, ColumnStatistics and [Type]ColumnStatistics are very simple 
interfaces with minimum getter functions. It is the duty of 
ColumnStatisticsImpl class to define/implement most common interfaces and act 
as the base class in most writer implementations. Other 
[Type]ColumnStatisticsImpls just extend ColumnStatisticsImpl and implement 
[Type]ColumnStatistics to add their own logic to remove duplicate code. 
However, on C++ side, ColumnStatisticsImpl and [Type]ColumnStatisticsImpl have 
no inheritance relation like Java side. We cannot simply make 
[Type]ColumnStatisticsImpl inherit ColumnStatisticsImpl as it may introduce 
virtual inheritance issue because they have a common base class. Templates do 
not solve this issue as there is still no base class defining all common 
interfaces. In this case, we can expect that we need to use dynamic_cast almost 
everywhere if we want to use ColumnStatistcis abstraction; otherwise, we need 
to bind each [Type]ColumnStatistics to [Type]ColumnWriter leading to another 
place with huge amount of duplicate code.


> [C++] Refactor ColumnStatistics classes for writer
> --------------------------------------------------
>
>                 Key: ORC-184
>                 URL: https://issues.apache.org/jira/browse/ORC-184
>             Project: ORC
>          Issue Type: Sub-task
>          Components: C++
>            Reporter: Gang Wu
>            Assignee: Gang Wu
>
> 1. Add setter functions to ColumnStatistics.
> 2. Refactor ColumnStatistics to reduce duplicate code.
> 3. Add more functions in Int128 and Decimal classes for 
> DecimalColumnStatistics.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to