You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by centerqi hu <ce...@gmail.com> on 2014/01/07 03:00:55 UTC
Re: problem while loading data in Hive
2014/1/6 Archana Verma <ar...@gmail.com>
> ê
Hi Archana
I read the code and found that there are limits
hive/TableDefWriter.java
/**
* Return a string identifying the character to use as a delimiter
* in Hive, in octal representation.
* Hive can specify delimiter characters in the form '\ooo' where
* ooo is a three-digit octal number between 000 and 177. Values
* may not be truncated ('\12' is wrong; '\012' is ok) nor may they
* be zero-prefixed (e.g., '\0177' is wrong).
*
* @param charNum the character to use as a delimiter
* @return a string of the form "\ooo" where ooo is an octal number
* in [000, 177].
* @throws IllegalArgumentException if charNum > 0177.
*/
public static String getHiveOctalCharCode(int charNum) {
if (charNum > 0177) {
throw new IllegalArgumentException(
"Character " + charNum + " is an out-of-range delimiter");
}
return String.format("\\%03o", charNum);
}
--
centerqi@gmail.com|Hu