hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From centerqi hu <cente...@gmail.com>
Subject Re: problem while loading data in Hive
Date Tue, 07 Jan 2014 02:00:55 GMT
2014/1/6 Archana Verma <archu184@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 &gt; 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

Mime
View raw message