drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3935) Modify VarCharWriter to allow passing byte[]
Date Wed, 14 Oct 2015 22:10:06 GMT
Andrew created DRILL-3935:

             Summary: Modify VarCharWriter to allow passing byte[]
                 Key: DRILL-3935
                 URL: https://issues.apache.org/jira/browse/DRILL-3935
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Data Types
            Reporter: Andrew
            Assignee: Andrew
            Priority: Minor
             Fix For: 1.3.0

In RecordReader implementations, one sometimes has variable-length string data in the form
of byte arrays. It is a cumbersome idiom to pack these into a DrillBuf, only to pass it on
to the write. 

I propose adding this method to the VarCharWriter interface: public void writeVarChar(int
start, int end, byte[] bytes);

Without this I currently have to do:
byte[] bytes = value.getBytes(Charsets.UTF_8);
buffer.setBytes(0, bytes);
writer.varChar().writeVarChar(0, bytes.length, buffer);

This message was sent by Atlassian JIRA

View raw message