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

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

Github user omalley commented on a diff in the pull request:

    https://github.com/apache/orc/pull/292#discussion_r205179355
  
    --- Diff: java/core/src/java/org/apache/orc/impl/ColumnStatisticsImpl.java 
---
    @@ -621,12 +703,54 @@ public void merge(ColumnStatisticsImpl other) {
     
         @Override
         public String getMinimum() {
    -      return minimum == null ? null : minimum.toString();
    +      /* if we have lower bound set (in case of truncation)
    +      getMinimum will be null */
    +      if(isLowerBoundSet) {
    +        return null;
    +      } else {
    +        return minimum == null ? null : minimum.toString();
    +      }
         }
     
         @Override
         public String getMaximum() {
    -      return maximum == null ? null : maximum.toString();
    +      /* if we have upper bound is set (in case of truncation)
    +      getMaximum will be null */
    +      if(isUpperBoundSet) {
    +        return null;
    +      } else {
    +        return maximum == null ? null : maximum.toString();
    +      }
    +    }
    +
    +    /**
    +     * Get the string with
    +     * length = Min(StringStatisticsImpl.MAX_STRING_LENGTH_RECORDED, 
getMinimum())
    +     *
    +     * @return lower bound
    +     */
    +    @Override
    +    public String getLowerBound() {
    +      if(isLowerBoundSet) {
    +        return minimum.toString();
    +      } else {
    +        return null;
    --- End diff --
    
    This should always return minimum.


> Modify the StringStatistics to trim minimum and maximum values
> --------------------------------------------------------------
>
>                 Key: ORC-203
>                 URL: https://issues.apache.org/jira/browse/ORC-203
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Owen O'Malley
>            Assignee: Sandeep More
>            Priority: Major
>
> Currently the StringStatistics will record the entire value for minimum or 
> maximum. It creates large protobuf objects and serves very little value. I 
> think we should trim long strings to 1024 characters and record the fact that 
> they were trimmed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to