title: For Hive partition based on date, why use string type? why not int?
body: <p>If I'm defining a table in Hive, and will be partitioning based on date, and my dates are in the format YYYYMMDD, which should I choose for the type, int or string?</p>
  
  <p>If it was just a field, and therefore in the files I'm supplying for the table, I could see using a string, even if only so that I can search for and identify malformed entries that might work their way into my data. But since I will be specifying the partition as part of the load process, I know I'll always have correctly formed values.</p>
  
  <p>When used in a <code>Where</code> clause, the partition field will normally be equality or less-than/greater-than logic.</p>