@Test public void testOutputSchema() throws Exception { StringBagsDifference udf = new StringBagsDifference(); Schema irrelevantSchema = null; Schema resultSchema = udf.outputSchema(irrelevantSchema); assertNotNull(resultSchema); assertEquals(1, resultSchema.getFields().size()); assertEquals(DataType.BAG, resultSchema.getField(0).type); assertEquals(1, resultSchema.getField(0).schema.getFields().size()); assertEquals(DataType.TUPLE, resultSchema.getField(0).schema.getField(0).type); assertEquals(1, resultSchema.getField(0).schema.getField(0).schema.getFields().size()); assertEquals(DataType.CHARARRAY, resultSchema.getField(0).schema.getField(0).schema.getField(0).type); }
@Override public Schema outputSchema(Schema input) { try { return SchemaUtil.newBagSchema(Lists.newArrayList(DataType.CHARARRAY)); } catch (FrontendException ex) { return null; } }
StringBagsDifference extends EvalFunc<DataBag> { @Override public Schema outputSchema(Schema input) { try { return SchemaUtil.newBagSchema(Lists.newArrayList(DataType.CHARARRAY)); } catch (FrontendException ex) { return null; } } }
StringBagsDifference extends EvalFunc<DataBag> { @Override public Schema outputSchema(Schema input) { try { return SchemaUtil.newBagSchema(Lists.newArrayList(DataType.CHARARRAY)); } catch (FrontendException ex) { return null; } }  }
StringBagsDifference extends EvalFunc<DataBag> { @Override public Schema outputSchema(Schema input) { try { return SchemaUtil.newBagSchema(Lists.newArrayList(DataType.CHARARRAY)); } catch (FrontendException ex) { return null; } }  @Override DataBag exec(Tuple tuple); @Override Schema outputSchema(Schema input); }
StringBagsDifference extends EvalFunc<DataBag> { @Override public Schema outputSchema(Schema input) { try { return SchemaUtil.newBagSchema(Lists.newArrayList(DataType.CHARARRAY)); } catch (FrontendException ex) { return null; } }  @Override DataBag exec(Tuple tuple); @Override Schema outputSchema(Schema input);  }