From bfe2338337a6a700f15644a91c17d8b7e8c72eba Mon Sep 17 00:00:00 2001 From: "Robert (Bobby) Evans" Date: Mon, 2 Aug 2021 13:08:05 -0500 Subject: [PATCH] Addressed review comments --- .../main/java/ai/rapids/cudf/Aggregation.java | 44 +++++++++---------- .../ai/rapids/cudf/AggregationOverWindow.java | 2 +- .../ai/rapids/cudf/GroupByAggregation.java | 2 +- .../cudf/GroupByAggregationOnColumn.java | 2 +- .../rapids/cudf/GroupByScanAggregation.java | 2 +- .../cudf/GroupByScanAggregationOnColumn.java | 2 +- .../ai/rapids/cudf/ReductionAggregation.java | 2 +- .../ai/rapids/cudf/RollingAggregation.java | 2 +- .../cudf/RollingAggregationOnColumn.java | 2 +- .../java/ai/rapids/cudf/ScanAggregation.java | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/java/src/main/java/ai/rapids/cudf/Aggregation.java b/java/src/main/java/ai/rapids/cudf/Aggregation.java index 0480dc465ab..734d9cb5694 100644 --- a/java/src/main/java/ai/rapids/cudf/Aggregation.java +++ b/java/src/main/java/ai/rapids/cudf/Aggregation.java @@ -194,7 +194,7 @@ public boolean equals(Object other) { } } - private static class QuantileAggregation extends Aggregation { + private static final class QuantileAggregation extends Aggregation { private final QuantileMethod method; private final double[] quantiles; @@ -423,7 +423,7 @@ static void close(long[] ptrs) { static native void close(long ptr); - static class SumAggregation extends NoParamAggregation { + static final class SumAggregation extends NoParamAggregation { private SumAggregation() { super(Kind.SUM); } @@ -436,7 +436,7 @@ static SumAggregation sum() { return new SumAggregation(); } - static class ProductAggregation extends NoParamAggregation { + static final class ProductAggregation extends NoParamAggregation { private ProductAggregation() { super(Kind.PRODUCT); } @@ -449,7 +449,7 @@ static ProductAggregation product() { return new ProductAggregation(); } - static class MinAggregation extends NoParamAggregation { + static final class MinAggregation extends NoParamAggregation { private MinAggregation() { super(Kind.MIN); } @@ -462,7 +462,7 @@ static MinAggregation min() { return new MinAggregation(); } - static class MaxAggregation extends NoParamAggregation { + static final class MaxAggregation extends NoParamAggregation { private MaxAggregation() { super(Kind.MAX); } @@ -475,7 +475,7 @@ static MaxAggregation max() { return new MaxAggregation(); } - static class CountAggregation extends CountLikeAggregation { + static final class CountAggregation extends CountLikeAggregation { private CountAggregation(NullPolicy nullPolicy) { super(Kind.COUNT, nullPolicy); } @@ -497,7 +497,7 @@ static CountAggregation count(NullPolicy nullPolicy) { return new CountAggregation(nullPolicy); } - static class AnyAggregation extends NoParamAggregation { + static final class AnyAggregation extends NoParamAggregation { private AnyAggregation() { super(Kind.ANY); } @@ -512,7 +512,7 @@ static AnyAggregation any() { return new AnyAggregation(); } - static class AllAggregation extends NoParamAggregation { + static final class AllAggregation extends NoParamAggregation { private AllAggregation() { super(Kind.ALL); } @@ -527,7 +527,7 @@ static AllAggregation all() { return new AllAggregation(); } - static class SumOfSquaresAggregation extends NoParamAggregation { + static final class SumOfSquaresAggregation extends NoParamAggregation { private SumOfSquaresAggregation() { super(Kind.SUM_OF_SQUARES); } @@ -540,7 +540,7 @@ static SumOfSquaresAggregation sumOfSquares() { return new SumOfSquaresAggregation(); } - static class MeanAggregation extends NoParamAggregation { + static final class MeanAggregation extends NoParamAggregation { private MeanAggregation() { super(Kind.MEAN); } @@ -553,7 +553,7 @@ static MeanAggregation mean() { return new MeanAggregation(); } - static class M2Aggregation extends NoParamAggregation { + static final class M2Aggregation extends NoParamAggregation { private M2Aggregation() { super(Kind.M2); } @@ -566,7 +566,7 @@ static M2Aggregation M2() { return new M2Aggregation(); } - static class VarianceAggregation extends DdofAggregation { + static final class VarianceAggregation extends DdofAggregation { private VarianceAggregation(int ddof) { super(Kind.VARIANCE, ddof); } @@ -589,7 +589,7 @@ static VarianceAggregation variance(int ddof) { } - static class StandardDeviationAggregation extends DdofAggregation { + static final class StandardDeviationAggregation extends DdofAggregation { private StandardDeviationAggregation(int ddof) { super(Kind.STD, ddof); } @@ -611,7 +611,7 @@ static StandardDeviationAggregation standardDeviation(int ddof) { return new StandardDeviationAggregation(ddof); } - static class MedianAggregation extends NoParamAggregation { + static final class MedianAggregation extends NoParamAggregation { private MedianAggregation() { super(Kind.MEDIAN); } @@ -638,7 +638,7 @@ static QuantileAggregation quantile(QuantileMethod method, double ... quantiles) return new QuantileAggregation(method, quantiles); } - static class ArgMaxAggregation extends NoParamAggregation { + static final class ArgMaxAggregation extends NoParamAggregation { private ArgMaxAggregation() { super(Kind.ARGMAX); } @@ -654,7 +654,7 @@ static ArgMaxAggregation argMax() { return new ArgMaxAggregation(); } - static class ArgMinAggregation extends NoParamAggregation { + static final class ArgMinAggregation extends NoParamAggregation { private ArgMinAggregation() { super(Kind.ARGMIN); } @@ -670,7 +670,7 @@ static ArgMinAggregation argMin() { return new ArgMinAggregation(); } - static class NuniqueAggregation extends CountLikeAggregation { + static final class NuniqueAggregation extends CountLikeAggregation { private NuniqueAggregation(NullPolicy nullPolicy) { super(Kind.NUNIQUE, nullPolicy); } @@ -713,7 +713,7 @@ static NthAggregation nth(int offset, NullPolicy nullPolicy) { return new NthAggregation(offset, nullPolicy); } - static class RowNumberAggregation extends NoParamAggregation { + static final class RowNumberAggregation extends NoParamAggregation { private RowNumberAggregation() { super(Kind.ROW_NUMBER); } @@ -726,7 +726,7 @@ static RowNumberAggregation rowNumber() { return new RowNumberAggregation(); } - static class RankAggregation extends NoParamAggregation { + static final class RankAggregation extends NoParamAggregation { private RankAggregation() { super(Kind.RANK); } @@ -739,7 +739,7 @@ static RankAggregation rank() { return new RankAggregation(); } - static class DenseRankAggregation extends NoParamAggregation { + static final class DenseRankAggregation extends NoParamAggregation { private DenseRankAggregation() { super(Kind.DENSE_RANK); } @@ -819,7 +819,7 @@ static MergeSetsAggregation mergeSets(NullEquality nullEquality, NaNEquality nan return new MergeSetsAggregation(nullEquality, nanEquality); } - static class LeadAggregation extends LeadLagAggregation { + static final class LeadAggregation extends LeadLagAggregation { private LeadAggregation(int offset, ColumnVector defaultOutput) { super(Kind.LEAD, offset, defaultOutput); } @@ -835,7 +835,7 @@ static LeadAggregation lead(int offset, ColumnVector defaultOutput) { return new LeadAggregation(offset, defaultOutput); } - static class LagAggregation extends LeadLagAggregation { + static final class LagAggregation extends LeadLagAggregation { private LagAggregation(int offset, ColumnVector defaultOutput) { super(Kind.LAG, offset, defaultOutput); } diff --git a/java/src/main/java/ai/rapids/cudf/AggregationOverWindow.java b/java/src/main/java/ai/rapids/cudf/AggregationOverWindow.java index 9a82eae65bf..d5544e01e7e 100644 --- a/java/src/main/java/ai/rapids/cudf/AggregationOverWindow.java +++ b/java/src/main/java/ai/rapids/cudf/AggregationOverWindow.java @@ -22,7 +22,7 @@ * An Aggregation instance that also holds a column number and window metadata so the aggregation * can be done over a specific window. */ -public class AggregationOverWindow { +public final class AggregationOverWindow { private final RollingAggregationOnColumn wrapped; protected final WindowOptions windowOptions; diff --git a/java/src/main/java/ai/rapids/cudf/GroupByAggregation.java b/java/src/main/java/ai/rapids/cudf/GroupByAggregation.java index 948faf65c3c..dd2adf8bee8 100644 --- a/java/src/main/java/ai/rapids/cudf/GroupByAggregation.java +++ b/java/src/main/java/ai/rapids/cudf/GroupByAggregation.java @@ -21,7 +21,7 @@ /** * An aggregation that can be used for a reduce. */ -public class GroupByAggregation { +public final class GroupByAggregation { private final Aggregation wrapped; private GroupByAggregation(Aggregation wrapped) { diff --git a/java/src/main/java/ai/rapids/cudf/GroupByAggregationOnColumn.java b/java/src/main/java/ai/rapids/cudf/GroupByAggregationOnColumn.java index 43c8dbe888e..c50cf3728f0 100644 --- a/java/src/main/java/ai/rapids/cudf/GroupByAggregationOnColumn.java +++ b/java/src/main/java/ai/rapids/cudf/GroupByAggregationOnColumn.java @@ -21,7 +21,7 @@ /** * A GroupByAggregation for a specific column in a table. */ -public class GroupByAggregationOnColumn { +public final class GroupByAggregationOnColumn { protected final GroupByAggregation wrapped; protected final int columnIndex; diff --git a/java/src/main/java/ai/rapids/cudf/GroupByScanAggregation.java b/java/src/main/java/ai/rapids/cudf/GroupByScanAggregation.java index 97250a71486..219b6dde05d 100644 --- a/java/src/main/java/ai/rapids/cudf/GroupByScanAggregation.java +++ b/java/src/main/java/ai/rapids/cudf/GroupByScanAggregation.java @@ -21,7 +21,7 @@ /** * An aggregation that can be used for a grouped scan. */ -public class GroupByScanAggregation { +public final class GroupByScanAggregation { private final Aggregation wrapped; private GroupByScanAggregation(Aggregation wrapped) { diff --git a/java/src/main/java/ai/rapids/cudf/GroupByScanAggregationOnColumn.java b/java/src/main/java/ai/rapids/cudf/GroupByScanAggregationOnColumn.java index 227cd58ae8c..75e4936e5b9 100644 --- a/java/src/main/java/ai/rapids/cudf/GroupByScanAggregationOnColumn.java +++ b/java/src/main/java/ai/rapids/cudf/GroupByScanAggregationOnColumn.java @@ -21,7 +21,7 @@ /** * A GroupByScanAggregation for a specific column in a table. */ -public class GroupByScanAggregationOnColumn { +public final class GroupByScanAggregationOnColumn { protected final GroupByScanAggregation wrapped; protected final int columnIndex; diff --git a/java/src/main/java/ai/rapids/cudf/ReductionAggregation.java b/java/src/main/java/ai/rapids/cudf/ReductionAggregation.java index ad96b93c400..7eff85dcd0d 100644 --- a/java/src/main/java/ai/rapids/cudf/ReductionAggregation.java +++ b/java/src/main/java/ai/rapids/cudf/ReductionAggregation.java @@ -21,7 +21,7 @@ /** * An aggregation that can be used for a reduce. */ -public class ReductionAggregation { +public final class ReductionAggregation { private final Aggregation wrapped; private ReductionAggregation(Aggregation wrapped) { diff --git a/java/src/main/java/ai/rapids/cudf/RollingAggregation.java b/java/src/main/java/ai/rapids/cudf/RollingAggregation.java index b7e56606fb5..07983f77aad 100644 --- a/java/src/main/java/ai/rapids/cudf/RollingAggregation.java +++ b/java/src/main/java/ai/rapids/cudf/RollingAggregation.java @@ -21,7 +21,7 @@ /** * An aggregation that can be used on rolling windows. */ -public class RollingAggregation { +public final class RollingAggregation { private final Aggregation wrapped; private RollingAggregation(Aggregation wrapped) { diff --git a/java/src/main/java/ai/rapids/cudf/RollingAggregationOnColumn.java b/java/src/main/java/ai/rapids/cudf/RollingAggregationOnColumn.java index 7fde7c30b3f..a6b1484aa71 100644 --- a/java/src/main/java/ai/rapids/cudf/RollingAggregationOnColumn.java +++ b/java/src/main/java/ai/rapids/cudf/RollingAggregationOnColumn.java @@ -21,7 +21,7 @@ /** * A RollingAggregation for a specific column in a table. */ -public class RollingAggregationOnColumn { +public final class RollingAggregationOnColumn { protected final RollingAggregation wrapped; protected final int columnIndex; diff --git a/java/src/main/java/ai/rapids/cudf/ScanAggregation.java b/java/src/main/java/ai/rapids/cudf/ScanAggregation.java index bd19546e5ef..08489562adc 100644 --- a/java/src/main/java/ai/rapids/cudf/ScanAggregation.java +++ b/java/src/main/java/ai/rapids/cudf/ScanAggregation.java @@ -21,7 +21,7 @@ /** * An aggregation that can be used for a scan. */ -public class ScanAggregation { +public final class ScanAggregation { private final Aggregation wrapped; private ScanAggregation(Aggregation wrapped) {