drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5518) Roll-up of a number of test framework enhancements
Date Thu, 22 Jun 2017 17:15:00 GMT

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

ASF GitHub Bot commented on DRILL-5518:
---------------------------------------

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

    https://github.com/apache/drill/pull/851#discussion_r123567643
  
    --- Diff: exec/vector/src/main/java/org/apache/drill/exec/vector/accessor/impl/TupleReaderImpl.java
---
    @@ -101,8 +88,61 @@ public String getAsString(int colIndex) {
           return "\"" + colReader.getString() + "\"";
         case DECIMAL:
           return colReader.getDecimal().toPlainString();
    +    case ARRAY:
    +      return getArrayAsString(colReader.array());
         default:
           throw new IllegalArgumentException("Unsupported type " + colReader.valueType());
         }
       }
    +
    +  private String bytesToString(byte[] value) {
    +    StringBuilder buf = new StringBuilder()
    +        .append("[");
    +    int len = Math.min(value.length, 20);
    +    for (int i = 0; i < len;  i++) {
    +      if (i > 0) {
    +        buf.append(", ");
    +      }
    +      buf.append((int) value[i]);
    +    }
    +    if (value.length > len) {
    +      buf.append("...");
    +    }
    +    buf.append("]");
    +    return buf.toString();
    +  }
    +
    +  private String getArrayAsString(ArrayReader array) {
    +    StringBuilder buf = new StringBuilder();
    +    buf.append("[");
    +    for (int i = 0; i < array.size(); i++) {
    +      if (i > 0) {
    +        buf.append( ", " );
    +      }
    +      switch (array.valueType()) {
    --- End diff --
    
    Fixed.


> Roll-up of a number of test framework enhancements
> --------------------------------------------------
>
>                 Key: DRILL-5518
>                 URL: https://issues.apache.org/jira/browse/DRILL-5518
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.11.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>             Fix For: 1.11.0
>
>
> Recent development work identified a number of minor enhancements to the "sub-operator"
unit tests:
> * Create a {{SubOperatorTest}} base class to do routine setup and shutdown.
> * Additional methods to simplify creating complex schemas with field widths.
> * Define a test workspace with plugin-specific options (as for the CSV storage plugin)
> * When verifying row sets, add methods to verify and release just the "actual" batch
in addition to the existing method for verify and free both the actual and expected batches.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message