Skip to content

Commit 520c80c

Browse files
committed
WiP: add a deeper version.
1 parent 3e35efd commit 520c80c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

parquet-benchmarks/src/main/java/org/apache/parquet/benchmarks/VariantBenchmark.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,12 @@ public class VariantBenchmark {
9393

9494
/** Whether to include nested sub-objects in the field values. */
9595
public enum Depth {
96-
Shallow,
97-
Nested
96+
/** Flat structure: no nesting. */
97+
Flat,
98+
/** Nested values. */
99+
Nested,
100+
/** Deeper nesting structure. */
101+
DeepNesting;
98102
}
99103

100104
/**
@@ -108,7 +112,7 @@ public enum Depth {
108112
private int fieldCount;
109113

110114
/** Whether to include nested variant objects as some of the field values. */
111-
@Param({"Shallow", "Nested"})
115+
@Param({"Flat", "Nested", "DeepNesting"})
112116
private Depth depth;
113117

114118
/**
@@ -195,7 +199,7 @@ public FieldEntry(final FieldType type, final Object value) {
195199
}
196200
}
197201

198-
/** Number of fields in each nested sub-object (when {@link #depth} is {@link Depth#Nested}). */
202+
/** Number of fields in each nested sub-object in a nested variant. */
199203
private static final int NESTED_FIELD_COUNT = 5;
200204

201205
// ---- state built once per trial ----
@@ -262,7 +266,7 @@ public void setupTrial() {
262266
// Type distribution: biased towards strings.
263267

264268
int typeCount = FieldType.Nested.ordinal();
265-
if (depth != Depth.Nested) {
269+
if (depth == Depth.Flat) {
266270
typeCount--;
267271
}
268272

0 commit comments

Comments
 (0)