@@ -131,7 +131,9 @@ public boolean equals(Object obj) {
131
131
132
132
@ Evaluator (extraName = "Double" )
133
133
static void process (DoubleBlock .Builder builder , @ Position int position , DoubleBlock bestEstimateBlock , DoubleBlock estimatesBlock ) {
134
- assert bestEstimateBlock .getValueCount (position ) == 1 : "bestEstimate: expected 1 element, got " + bestEstimateBlock .getValueCount (position );
134
+ if (bestEstimateBlock .getValueCount (position ) != 1 ) {
135
+ builder .appendNull ();
136
+ }
135
137
Number bestEstimate = bestEstimateBlock .getDouble (bestEstimateBlock .getFirstValueIndex (position ));
136
138
137
139
Number [] estimates = new Number [estimatesBlock .getValueCount (position )];
@@ -145,13 +147,14 @@ static void process(DoubleBlock.Builder builder, @Position int position, DoubleB
145
147
builder .appendDouble (v .doubleValue ());
146
148
}
147
149
builder .endPositionEntry ();
148
-
149
- System .out .println ("@@@ bestEstimate = " + bestEstimate + ", estimates = " + Arrays .toString (estimates ) + " --> confidenceInterval = " + Arrays .toString (confidenceInterval ));
150
150
}
151
151
152
152
@ Evaluator (extraName = "Int" )
153
153
static void process (IntBlock .Builder builder , @ Position int position , IntBlock bestEstimateBlock , IntBlock estimatesBlock ) {
154
- assert bestEstimateBlock .getValueCount (position ) == 1 : "bestEstimate: expected 1 element, got " + bestEstimateBlock .getValueCount (position );
154
+ if (bestEstimateBlock .getValueCount (position ) != 1 ) {
155
+ builder .appendNull ();
156
+ return ;
157
+ }
155
158
Number bestEstimate = bestEstimateBlock .getInt (bestEstimateBlock .getFirstValueIndex (position ));
156
159
157
160
Number [] estimates = new Number [estimatesBlock .getValueCount (position )];
@@ -169,7 +172,10 @@ static void process(IntBlock.Builder builder, @Position int position, IntBlock b
169
172
170
173
@ Evaluator (extraName = "Long" )
171
174
static void process (LongBlock .Builder builder , @ Position int position , LongBlock bestEstimateBlock , LongBlock estimatesBlock ) {
172
- assert bestEstimateBlock .getValueCount (position ) == 1 : "bestEstimate: expected 1 element, got " + bestEstimateBlock .getValueCount (position );
175
+ if (bestEstimateBlock .getValueCount (position ) != 1 ) {
176
+ builder .appendNull ();
177
+ return ;
178
+ }
173
179
Number bestEstimate = bestEstimateBlock .getLong (bestEstimateBlock .getFirstValueIndex (position ));
174
180
175
181
Number [] estimates = new Number [estimatesBlock .getValueCount (position )];
0 commit comments