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

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

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

    https://github.com/apache/drill/pull/336#discussion_r50741405
  
    --- Diff: exec/vector/src/main/java/org/apache/drill/exec/util/Text.java ---
    @@ -0,0 +1,612 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.drill.exec.util;
    +
    +import java.io.DataInput;
    +import java.io.IOException;
    +import java.nio.ByteBuffer;
    +import java.nio.CharBuffer;
    +import java.nio.charset.CharacterCodingException;
    +import java.nio.charset.Charset;
    +import java.nio.charset.CharsetDecoder;
    +import java.nio.charset.CharsetEncoder;
    +import java.nio.charset.CodingErrorAction;
    +import java.nio.charset.MalformedInputException;
    +import java.text.CharacterIterator;
    +import java.text.StringCharacterIterator;
    +import java.util.Arrays;
    +
    +import com.fasterxml.jackson.core.JsonGenerationException;
    +import com.fasterxml.jackson.core.JsonGenerator;
    +import com.fasterxml.jackson.databind.SerializerProvider;
    +import com.fasterxml.jackson.databind.annotation.JsonSerialize;
    +import com.fasterxml.jackson.databind.ser.std.StdSerializer;
    +
    +/**
    + * A simplified byte wrapper similar to Hadoop's Text class without all 
the dependencies. Lifted from Hadoop 2.7.1
    + */
    +@JsonSerialize(using = Text.TextSerializer.class)
    +public class Text {
    --- End diff --
    
    Because a few real changes were made to this class (it isn't just copying 
the source to avoid including the jar that contains it) it would be good to 
have an explicit pointer to the version of this class that this was based on. 
Is this pulled out of the Hadoop source at the commit tagged for the 2.7.1 
release?
    
    It might have been cleaner to do this in two commits, one just checking in 
the class exactly as it appears in Hadoop, with just the packaged changed and a 
follow up commit the with refactoring to remove the dependencies imported in 
the hadoop version of the class. At least a mention of a commit ID this was 
pulled out of would give a pointer to the exact version this was based on if we 
ever had to apply a patch from Hadoop mainline that didn't merge cleanly.


> Ensure the jdbc-all driver jar includes classes required to return VarChar[]
> ----------------------------------------------------------------------------
>
>                 Key: DRILL-4291
>                 URL: https://issues.apache.org/jira/browse/DRILL-4291
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>    Affects Versions: 0.5.0
>         Environment: Linux / 1.5-SNAPSHOT
>            Reporter: Stefán Baxter
>            Assignee: Jason Altekruse
>
> Hi,
> We are using the 1.5-SNAPSHOT version of the JDBC drilver (all) and we seem 
> to be getting this old thing:
> https://issues.apache.org/jira/browse/DRILL-2482
> We are either doing something wrong or this or this is a regression. Has 
> anyone else experienced not being able to get nested structures via the 
> latest JDBC driver?
> (I'm going to pull the lastest from master to be sure this has not been 
> solved)
> The error we get when accessing a field containing a sub-structure is :
> java.lang.NoClassDefFoundError: org/apache/hadoop/io/Text
>     at 
> oadd.org.apache.drill.exec.util.JsonStringArrayList.<clinit>(JsonStringArrayList.java:35)
>     at 
> oadd.org.apache.drill.exec.vector.RepeatedVarCharVector$Accessor.getObject(RepeatedVarCharVector.java:293)
>     at 
> oadd.org.apache.drill.exec.vector.RepeatedVarCharVector$Accessor.getObject(RepeatedVarCharVector.java:290)
>     at 
> oadd.org.apache.drill.exec.vector.accessor.GenericAccessor.getObject(GenericAccessor.java:44)
>     at 
> oadd.org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getObject(BoundCheckingAccessor.java:148)
>     at 
> org.apache.drill.jdbc.impl.TypeConvertingSqlAccessor.getObject(TypeConvertingSqlAccessor.java:795)
>     at 
> org.apache.drill.jdbc.impl.AvaticaDrillSqlAccessor.getObject(AvaticaDrillSqlAccessor.java:179)
>     at 
> oadd.net.hydromatic.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:351)
>     at 
> org.apache.drill.jdbc.impl.DrillResultSetImpl.getObject(DrillResultSetImpl.java:420)
> Regards,
>  -Stefan



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to