public class Schema extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Schema.Builder |
Modifier and Type | Method and Description |
---|---|
HostColumnVector.DataType |
asHostDataType() |
static Schema.Builder |
builder() |
Schema |
getChild(int i)
Get the schema of a child element.
|
DType[] |
getChildTypes()
Get types of the top level child columns in schema.
|
String[] |
getColumnNames()
Get names of the top level child columns in schema.
|
String[] |
getFlattenedColumnNames()
Get names of the columns flattened from all levels in schema by depth-first traversal.
|
int[] |
getFlattenedDecimalPrecisions()
Get decimal precisions of the columns' types flattened from all levels in schema by
depth-first traversal.
|
int[] |
getFlattenedNumChildren()
Get numbers of child columns for each level in schema.
|
int[] |
getFlattenedTypeIds()
Get type ids of the columns flattened from all levels in schema by depth-first traversal.
|
DType[] |
getFlattenedTypes()
Get the types of the columns in schema flattened from all levels by depth-first traversal.
|
int[] |
getFlattenedTypeScales()
Get scales of the columns' types flattened from all levels in schema by depth-first traversal.
|
int |
getNumChildren()
Get number of top level child columns in schema.
|
DType |
getType() |
boolean |
hasNestedChildren()
This is really for a top level struct schema where it is nested, but
for things like CSV we care that it does not have any children that are also
nested.
|
boolean |
isNested()
Check if the schema is nested (i.e., top level type is LIST or STRUCT).
|
boolean |
isStructOrHasStructDescendant()
Check to see if the schema includes a struct at all.
|
String |
toString() |
public static final Schema INFERRED
public Schema getChild(int i)
i
- the index of the child to read.IndexOutOfBoundsException
- if the index is not in the range of children.public static Schema.Builder builder()
public String[] getFlattenedColumnNames()
public String[] getColumnNames()
public boolean isNested()
public boolean hasNestedChildren()
public int[] getFlattenedTypeIds()
public int[] getFlattenedTypeScales()
public int[] getFlattenedDecimalPrecisions()
This is used to pass down the decimal precisions from Spark to only the JNI layer, where some JNI functions require precision values to perform their operations. Decimal precisions should not be consumed by any libcudf's APIs since libcudf does not support precisions for fixed point numbers.
public DType[] getFlattenedTypes()
public DType[] getChildTypes()
public int getNumChildren()
public int[] getFlattenedNumChildren()
public DType getType()
public boolean isStructOrHasStructDescendant()
public HostColumnVector.DataType asHostDataType()
Copyright © 2025. All rights reserved.