water.parser
Class CsvParser
java.lang.Object
water.Iced
water.parser.CustomParser
water.parser.CsvParser
- All Implemented Interfaces:
- java.lang.Cloneable, Freezable
public class CsvParser
- extends CustomParser
Fields inherited from class water.parser.CustomParser |
_setup, CHAR_COMMA, CHAR_CR, CHAR_DOUBLE_QUOTE, CHAR_FF, CHAR_LF, CHAR_NULL, CHAR_SINGLE_QUOTE, CHAR_SPACE, CHAR_TAB, CHAR_VT, MAX_PREVIEW_COLS, MAX_PREVIEW_LINES |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTO_SEP
public static final byte AUTO_SEP
- See Also:
- Constant Field Values
CHAR_DECIMAL_SEPARATOR
public final byte CHAR_DECIMAL_SEPARATOR
- See Also:
- Constant Field Values
CHAR_SEPARATOR
public final byte CHAR_SEPARATOR
HIVE_SEP
public static final byte HIVE_SEP
- See Also:
- Constant Field Values
CsvParser
public CsvParser(CustomParser.ParserSetup setup)
clone
public CsvParser clone()
- Specified by:
clone
in class CustomParser
parallelParseSupported
public boolean parallelParseSupported()
- Overrides:
parallelParseSupported
in class CustomParser
parallelParse
public final CustomParser.DataOut parallelParse(int cidx,
CustomParser.DataIn din,
CustomParser.DataOut dout)
- Overrides:
parallelParse
in class CustomParser
guessSetup
public static CustomParser.PSetupGuess guessSetup(byte[] bits)
- Determines the CSV parser setup from the first two lines. Also parses
the next few lines, tossing out comments and blank lines.
A separator is given or it is selected if both two lines have the same ammount of them
and the tokenization then returns same number of columns.
guessSetup
public static CustomParser.PSetupGuess guessSetup(byte[] bits,
CustomParser.ParserSetup setup)
guessSetup
public static CustomParser.PSetupGuess guessSetup(byte[] bits,
CustomParser.ParserSetup setup,
boolean checkHeader)
isCompatible
public boolean isCompatible(CustomParser p)
- Overrides:
isCompatible
in class CustomParser