Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions extensions-core/orc-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@
<artifactId>validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-storage-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import java.util.Map;
import java.util.stream.Collectors;

public class OrcStructConverter
class OrcStructConverter
{
@Nonnull
private static List<Object> convertList(TypeDescription fieldDescription, OrcList orcList, boolean binaryAsString)
Expand Down Expand Up @@ -84,8 +84,16 @@ private static Map<Object, Object> convertMap(
return converted;
}

private static Object convertPrimitive(TypeDescription fieldDescription, WritableComparable field, boolean binaryAsString)
@Nullable
private static Object convertPrimitive(
TypeDescription fieldDescription,
@Nullable WritableComparable field,
boolean binaryAsString
)
{
if (field == null) {
return null;
}
/*
ORC TYPE WRITABLE TYPE
binary org.apache.hadoop.io.BytesWritable
Expand Down Expand Up @@ -140,7 +148,7 @@ private static Object convertPrimitive(TypeDescription fieldDescription, Writabl
}
}

private boolean binaryAsString;
private final boolean binaryAsString;
private Object2IntMap<String> fieldIndexCache;

OrcStructConverter(boolean binaryAsString)
Expand Down
Loading