[
https://issues.apache.org/jira/browse/DRILL-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15120841#comment-15120841
]
ASF GitHub Bot commented on DRILL-4291:
---------------------------------------
Github user jacques-n commented on a diff in the pull request:
https://github.com/apache/drill/pull/336#discussion_r51083291
--- 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 --
I took this from the source jar of the Hadoop 2.7.1 release, not a
particular commit. That is why I noted that origin in the comment at the top of
the file. Looking at how Hadoop tags, that looks it is the same as
ac0538aac347bfd97cc0dee1db49db503c15f1d9 but I think the version number should
suffice. Good idea on the two commits. I'll do that in the future if I need to
do this kind of thing again.
> 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)