blob: 99de93ce16f7cf6ee81c289d95b55a98bd8ed2b1 [file] [log] [blame]
/*
* Copyright 2016, Yahoo! Inc.
* Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms.
*/
package com.yahoo.sketches.pig.quantiles;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.data.Tuple;
import org.apache.pig.data.TupleFactory;
class Util {
static Tuple doubleArrayToTuple(final double[] array) throws ExecException {
final Tuple tuple = TupleFactory.getInstance().newTuple(array.length);
for (int i = 0; i < array.length; i++) {
tuple.set(i, array[i]);
}
return tuple;
}
}