QuantileTests are failing when running against Pig 0.12.0
diff --git a/src/java/datafu/pig/stats/Quantile.java b/src/java/datafu/pig/stats/Quantile.java
index 170ecb2..912d54a 100644
--- a/src/java/datafu/pig/stats/Quantile.java
+++ b/src/java/datafu/pig/stats/Quantile.java
@@ -25,7 +25,9 @@
import org.apache.pig.data.DataType;
import org.apache.pig.data.Tuple;
import org.apache.pig.data.TupleFactory;
+import org.apache.pig.impl.logicalLayer.FrontendException;
import org.apache.pig.impl.logicalLayer.schema.Schema;
+import org.apache.pig.impl.logicalLayer.schema.Schema.FieldSchema;
import datafu.pig.util.SimpleEvalFunc;
@@ -192,7 +194,12 @@
for (Double x : this.quantiles)
tupleSchema.add(new Schema.FieldSchema("quantile_" + x.toString().replace(".", "_"), DataType.DOUBLE));
}
- return tupleSchema;
+
+ try {
+ return new Schema(new FieldSchema(null, tupleSchema, DataType.TUPLE));
+ } catch(FrontendException e) {
+ throw new RuntimeException(e);
+ }
}
}