private static class FieldNameSelector.FieldNameSanitizer<T> extends Object implements FieldNameSelector.FieldNamer<T>
_.| Modifier and Type | Field and Description |
|---|---|
private FieldNameSelector.FieldNamer<T> |
delegate |
private static org.slf4j.Logger |
LOGGER |
private static String |
NUMBER_PREFIX |
private static String |
REPLACEMENT_CHAR |
| Constructor and Description |
|---|
FieldNameSanitizer(FieldNameSelector.FieldNamer<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
String |
fieldNameFor(T column) |
private String |
sanitizeColumnName(String columnName)
Sanitize column names that are illegal in Avro
Must conform to https://avro.apache.org/docs/1.7.7/spec.html#Names
Legal characters are [a-zA-Z_] for the first character and [a-zA-Z0-9_] thereafter.
|
private static final org.slf4j.Logger LOGGER
private static final String REPLACEMENT_CHAR
private static final String NUMBER_PREFIX
private final FieldNameSelector.FieldNamer<T> delegate
public FieldNameSanitizer(FieldNameSelector.FieldNamer<T> delegate)
public String fieldNameFor(T column)
fieldNameFor in interface FieldNameSelector.FieldNamer<T>private String sanitizeColumnName(String columnName)
columnName - the column name name to be sanitizedCopyright © 2021 JBoss by Red Hat. All rights reserved.