Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <[email protected]>
  • Loading branch information
ttnghia committed Oct 25, 2024
1 parent 7fcc48e commit 771150c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions java/src/main/java/ai/rapids/cudf/Schema.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Schema {
private static final int UNKNOWN_PRECISION = -1;

private final DType topLevelType;
private final int precision; // storing precision for decimal types
private final int topLevelPrecision; // only applicable if the top level is a decimal type
private final List<String> childNames;
private final List<Schema> childSchemas;
private boolean flattened = false;
Expand All @@ -40,14 +40,12 @@ public class Schema {
private int[] flattenedCounts;
private int[] flattenedPrecisions;



private Schema(DType topLevelType,
int precision,
int topLevelPrecision,
List<String> childNames,
List<Schema> childSchemas) {
this.topLevelType = topLevelType;
this.precision = precision;
this.topLevelPrecision = topLevelPrecision;
this.childNames = childNames;
this.childSchemas = childSchemas;
}
Expand All @@ -63,7 +61,7 @@ private Schema(DType topLevelType,
*/
private Schema() {
topLevelType = null;
precision = UNKNOWN_PRECISION;
topLevelPrecision = UNKNOWN_PRECISION;
childNames = null;
childSchemas = null;
}
Expand Down Expand Up @@ -152,7 +150,7 @@ private int collectFlattened(String[] names, DType[] types, int[] counts, int[]
Schema child = childSchemas.get(i);
names[offset] = childNames.get(i);
types[offset] = child.topLevelType;
precisions[offset] = child.precision;
precisions[offset] = child.topLevelPrecision;
if (child.childNames != null) {
counts[offset] = child.childNames.size();
} else {
Expand Down Expand Up @@ -340,9 +338,9 @@ public static class Builder {
private final List<String> names;
private final List<Builder> types;

private Builder(DType topLevelType, int precision) {
private Builder(DType topLevelType, int topLevelPrecision) {
this.topLevelType = topLevelType;
this.topLevelPrecision = precision;
this.topLevelPrecision = topLevelPrecision;
if (topLevelType == DType.STRUCT || topLevelType == DType.LIST) {
// There can be children
names = new ArrayList<>();
Expand Down

0 comments on commit 771150c

Please sign in to comment.