Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/840#discussion_r124937740
  
    --- Diff: exec/vector/src/main/codegen/templates/FixedValueVectors.java ---
    @@ -31,68 +31,98 @@
     import org.apache.drill.exec.util.DecimalUtility;
     
     /**
    - * ${minor.class} implements a vector of fixed width values.  Elements in 
the vector are accessed
    - * by position, starting from the logical start of the vector.  Values 
should be pushed onto the
    - * vector sequentially, but may be randomly accessed.
    - *   The width of each element is ${type.width} byte(s)
    - *   The equivalent Java primitive is '${minor.javaType!type.javaType}'
    + * ${minor.class} implements a vector of fixed width values. Elements in 
the vector are accessed
    + * by position, starting from the logical start of the vector. Values 
should be pushed onto the
    + * vector sequentially, but may be accessed randomly.
    + * <ul>
    + * <li>The width of each element is {@link #VALUE_WIDTH} (= ${type.width}) 
byte<#if type.width != 1>s</#if>.</li>
    + * <li>The equivalent Java primitive is 
'${minor.javaType!type.javaType}'.</li>
    + * </ul>
      *
      * NB: this class is automatically generated from ${.template_name} and 
ValueVectorTypes.tdd using FreeMarker.
      */
    -public final class ${minor.class}Vector extends BaseDataValueVector 
implements FixedWidthVector{
    +public final class ${minor.class}Vector extends BaseDataValueVector 
implements FixedWidthVector {
       private static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(${minor.class}Vector.class);
     
    +  /**
    +   * Width of each fixed-width value.
    +   */
    +
    +  public static final int VALUE_WIDTH = ${type.width};
    +
    +  /**
    +   * Maximum number of values that this fixed-width vector can hold
    +   * and stay below the maximum vector size limit. This is the limit
    +   * enforced when the vector is used to hold values in a repeated
    +   * vector.
    +   */
    +
    +  public static final int MAX_VALUE_COUNT = MAX_BUFFER_SIZE / VALUE_WIDTH;
    +
    +  /**
    +   * Maximum number of values that this fixed-width vector can hold
    +   * and stay below the maximum vector size limit and/or stay below
    +   * the maximum row count. This is the limit enforced when the
    +   * vector is used to hold scalar (required or nullable) values.
    +   */
    +
    +  public static final int MAX_SCALAR_COUNT = Math.min(MAX_ROW_COUNT, 
MAX_VALUE_COUNT);
    --- End diff --
    
    @Added comment. For me, Eclipse sometimes opens the wrong version of this 
file, preventing it from finding the declaration of symbols, so the explanation 
is not entirely unnecessary...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to