public class OrcUtils extends Object
Constructor and Description |
---|
OrcUtils() |
Modifier and Type | Method and Description |
---|---|
static List<StripeInformation> |
convertProtoStripesToStripes(List<OrcProto.StripeInformation> stripes) |
static TypeDescription |
convertTypeFromProtobuf(List<OrcProto.Type> types,
int rootColumn)
Translate the given rootColumn from the list of types to a TypeDescription.
|
static List<OrcProto.Type> |
getOrcTypes(TypeDescription typeDescr) |
static String |
getOrcVersion()
Get the software version from Maven.
|
static String |
getSoftwareVersion(int writer,
String version)
Get the user-facing version string for the software that wrote the file.
|
static boolean[] |
includeColumns(String selectedColumns,
TypeDescription schema)
Returns selected columns as a boolean array with true value set for specified column names.
|
static int |
isValidTypeTree(List<OrcProto.Type> types,
int root)
Checks whether the list of protobuf types from the file are valid or not.
|
public static boolean[] includeColumns(String selectedColumns, TypeDescription schema)
Column names that aren't found are ignored.
selectedColumns
- - comma separated list of selected column namesschema
- - object schemapublic static List<OrcProto.Type> getOrcTypes(TypeDescription typeDescr)
public static int isValidTypeTree(List<OrcProto.Type> types, int root) throws IOException
types
- the list of types from the protobufroot
- the top of the tree to checkIOException
- if the tree is invalidpublic static TypeDescription convertTypeFromProtobuf(List<OrcProto.Type> types, int rootColumn) throws FileFormatException
types
- all of the typesrootColumn
- translate this typeFileFormatException
public static List<StripeInformation> convertProtoStripesToStripes(List<OrcProto.StripeInformation> stripes)
public static String getSoftwareVersion(int writer, String version)
writer
- the code for the writer from OrcProto.Footerversion
- the orcVersion from OrcProto.Footerpublic static String getOrcVersion()
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.