@Test (expected = RecipeException.class) public void testRenameOfExistingColumns() throws Exception { String[] directives = new String[] { "rename C2 C4", }; List<Row> rows = Arrays.asList( new Row("C1", "A").add("C2", "B").add("C3", "C").add("C4", "D").add("C5", "E") ); TestingRig.execute(directives, rows); }
@Override public List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException { for (Row row : rows) { ColumnConverter.rename(NAME, row, source.value(), target.value()); } return rows; }
Rename implements Directive, Lineage { @Override public List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException { for (Row row : rows) { ColumnConverter.rename(NAME, row, source.value(), target.value()); } return rows; } }
Rename implements Directive, Lineage { @Override public List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException { for (Row row : rows) { ColumnConverter.rename(NAME, row, source.value(), target.value()); } return rows; }  }
Rename implements Directive, Lineage { @Override public List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException { for (Row row : rows) { ColumnConverter.rename(NAME, row, source.value(), target.value()); } return rows; }  @Override UsageDefinition define(); @Override void initialize(Arguments args); @Override void destroy(); @Override List<Row> execute(List<Row> rows, ExecutorContext context); @Override Mutation lineage(); }
Rename implements Directive, Lineage { @Override public List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException { for (Row row : rows) { ColumnConverter.rename(NAME, row, source.value(), target.value()); } return rows; }  @Override UsageDefinition define(); @Override void initialize(Arguments args); @Override void destroy(); @Override List<Row> execute(List<Row> rows, ExecutorContext context); @Override Mutation lineage(); static final String NAME; }