public final class FieldFormatter
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeAndEnclose(java.lang.String str,
DelimiterSet delimiters)
Takes an input string representing the value of a field, encloses it in
enclosing chars, and escapes any occurrences of such characters in the
middle.
|
static java.lang.String |
hiveStringDropDelims(java.lang.String str,
DelimiterSet delimiters)
This drops all default Hive delimiters from the string and passes it on.
|
static java.lang.String |
hiveStringReplaceDelims(java.lang.String str,
java.lang.String replacement,
DelimiterSet delimiters)
replace hive delimiters with a user-defined string passed to the
--hive-delims-replacement option.
|
public static java.lang.String hiveStringDropDelims(java.lang.String str, DelimiterSet delimiters)
--hive-drop-delims
is provided.str
- delimiters
- public static java.lang.String hiveStringReplaceDelims(java.lang.String str, java.lang.String replacement, DelimiterSet delimiters)
str
- delimiters
- public static java.lang.String escapeAndEnclose(java.lang.String str, DelimiterSet delimiters)
str
- - The user's string to escape and enclosedelimiters
- - The DelimiterSet to use identifying the escape and
enclose semantics. If the specified escape or enclose characters are
'\000', those operations are not performed.Copyright © 2019 The Apache Software Foundation