@Test public void testMakeColumnOptional() { Schema schema = new Schema(required(1, "id", Types.IntegerType.get())); Schema expected = new Schema(optional(1, "id", Types.IntegerType.get())); Schema result = new SchemaUpdate(schema, 1) .makeColumnOptional("id") .apply(); Assert.assertEquals("Should update column to be optional", expected.asStruct(), result.asStruct()); }
@Override public UpdateSchema makeColumnOptional(String name) { internalUpdateColumnRequirement(name, true); return this; }
SchemaUpdate implements UpdateSchema { @Override public UpdateSchema makeColumnOptional(String name) { internalUpdateColumnRequirement(name, true); return this; } }
SchemaUpdate implements UpdateSchema { @Override public UpdateSchema makeColumnOptional(String name) { internalUpdateColumnRequirement(name, true); return this; } SchemaUpdate(TableOperations ops);   SchemaUpdate(Schema schema, int lastColumnId); }
SchemaUpdate implements UpdateSchema { @Override public UpdateSchema makeColumnOptional(String name) { internalUpdateColumnRequirement(name, true); return this; } SchemaUpdate(TableOperations ops);   SchemaUpdate(Schema schema, int lastColumnId); @Override SchemaUpdate allowIncompatibleChanges(); @Override UpdateSchema addColumn(String name, Type type, String doc); @Override UpdateSchema addColumn(String parent, String name, Type type, String doc); @Override UpdateSchema addRequiredColumn(String name, Type type, String doc); @Override UpdateSchema addRequiredColumn(String parent, String name, Type type, String doc); @Override UpdateSchema deleteColumn(String name); @Override UpdateSchema renameColumn(String name, String newName); @Override UpdateSchema requireColumn(String name); @Override UpdateSchema makeColumnOptional(String name); @Override UpdateSchema updateColumn(String name, Type.PrimitiveType newType); @Override UpdateSchema updateColumnDoc(String name, String doc); @Override UpdateSchema moveFirst(String name); @Override UpdateSchema moveBefore(String name, String beforeName); @Override UpdateSchema moveAfter(String name, String afterName); UpdateSchema updateSchema(Schema newSchema); @Override Schema apply(); @Override void commit(); }
SchemaUpdate implements UpdateSchema { @Override public UpdateSchema makeColumnOptional(String name) { internalUpdateColumnRequirement(name, true); return this; } SchemaUpdate(TableOperations ops);   SchemaUpdate(Schema schema, int lastColumnId); @Override SchemaUpdate allowIncompatibleChanges(); @Override UpdateSchema addColumn(String name, Type type, String doc); @Override UpdateSchema addColumn(String parent, String name, Type type, String doc); @Override UpdateSchema addRequiredColumn(String name, Type type, String doc); @Override UpdateSchema addRequiredColumn(String parent, String name, Type type, String doc); @Override UpdateSchema deleteColumn(String name); @Override UpdateSchema renameColumn(String name, String newName); @Override UpdateSchema requireColumn(String name); @Override UpdateSchema makeColumnOptional(String name); @Override UpdateSchema updateColumn(String name, Type.PrimitiveType newType); @Override UpdateSchema updateColumnDoc(String name, String doc); @Override UpdateSchema moveFirst(String name); @Override UpdateSchema moveBefore(String name, String beforeName); @Override UpdateSchema moveAfter(String name, String afterName); UpdateSchema updateSchema(Schema newSchema); @Override Schema apply(); @Override void commit();  }