@Test public void typicalBytes() throws Exception { Schema schema = SchemaBuilder.builder().bytesType(); Field field = new Field("b", schema, null, (Object) null); field.addProp(SENSITIVITY, PII); underTest.onPiiField(field, null); assertThat(schema.getProp("logicalType"), is("pii-bytes")); }
@Override protected void onPiiField(Field field, Collection<String> breadcrumb) { Schema schema = field.schema(); if (schema.getType() == UNION) { for (Schema type : schema.getTypes()) { addLogicalType(type); } } else { addLogicalType(schema); } }
PiiLogicalTypeVisitor extends PiiVisitor<Void> { @Override protected void onPiiField(Field field, Collection<String> breadcrumb) { Schema schema = field.schema(); if (schema.getType() == UNION) { for (Schema type : schema.getTypes()) { addLogicalType(type); } } else { addLogicalType(schema); } } }
PiiLogicalTypeVisitor extends PiiVisitor<Void> { @Override protected void onPiiField(Field field, Collection<String> breadcrumb) { Schema schema = field.schema(); if (schema.getType() == UNION) { for (Schema type : schema.getTypes()) { addLogicalType(type); } } else { addLogicalType(schema); } }  }
PiiLogicalTypeVisitor extends PiiVisitor<Void> { @Override protected void onPiiField(Field field, Collection<String> breadcrumb) { Schema schema = field.schema(); if (schema.getType() == UNION) { for (Schema type : schema.getTypes()) { addLogicalType(type); } } else { addLogicalType(schema); } }   }
PiiLogicalTypeVisitor extends PiiVisitor<Void> { @Override protected void onPiiField(Field field, Collection<String> breadcrumb) { Schema schema = field.schema(); if (schema.getType() == UNION) { for (Schema type : schema.getTypes()) { addLogicalType(type); } } else { addLogicalType(schema); } }    }