@@ -131,7 +131,9 @@ public boolean equals(Object obj) {
131131
132132 @ Evaluator (extraName = "Double" )
133133 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+ }
135137 Number bestEstimate = bestEstimateBlock .getDouble (bestEstimateBlock .getFirstValueIndex (position ));
136138
137139 Number [] estimates = new Number [estimatesBlock .getValueCount (position )];
@@ -145,13 +147,14 @@ static void process(DoubleBlock.Builder builder, @Position int position, DoubleB
145147 builder .appendDouble (v .doubleValue ());
146148 }
147149 builder .endPositionEntry ();
148-
149- System .out .println ("@@@ bestEstimate = " + bestEstimate + ", estimates = " + Arrays .toString (estimates ) + " --> confidenceInterval = " + Arrays .toString (confidenceInterval ));
150150 }
151151
152152 @ Evaluator (extraName = "Int" )
153153 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+ }
155158 Number bestEstimate = bestEstimateBlock .getInt (bestEstimateBlock .getFirstValueIndex (position ));
156159
157160 Number [] estimates = new Number [estimatesBlock .getValueCount (position )];
@@ -169,7 +172,10 @@ static void process(IntBlock.Builder builder, @Position int position, IntBlock b
169172
170173 @ Evaluator (extraName = "Long" )
171174 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+ }
173179 Number bestEstimate = bestEstimateBlock .getLong (bestEstimateBlock .getFirstValueIndex (position ));
174180
175181 Number [] estimates = new Number [estimatesBlock .getValueCount (position )];
0 commit comments