<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Best Data Type for Hive Date Partition in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Best-Data-Type-for-Hive-Date-Partition/m-p/89092#M4088</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would suggest to use INT rather than STRING.&lt;BR /&gt;&lt;BR /&gt;Firstly, searching based INT type is faster, and secondly, like you said, you can do numeric comparison, which will be different from the STRING type comparison.</description>
    <pubDate>Sat, 13 Apr 2019 02:32:55 GMT</pubDate>
    <dc:creator>EricL</dc:creator>
    <dc:date>2019-04-13T02:32:55Z</dc:date>
    <item>
      <title>Best Data Type for Hive Date Partition</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Best-Data-Type-for-Hive-Date-Partition/m-p/88800#M4087</link>
      <description>&lt;P&gt;we need to partition our Hive Table based on date. Date/Month/Year&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it better to use int or string for the partition types.&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;CREATE EXTERNAL TABLE partition (id string, event timestamp and so on)&lt;BR /&gt;PARTITIONED BY (year INT, month INT, day INT)&lt;/P&gt;&lt;P&gt;Stored as Parquet&lt;/P&gt;&lt;P&gt;vs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CREATE EXTERNAL TABLE partition (id string, event timestamp and so on)&lt;BR /&gt;PARTITIONED BY (year string, month string, day string)&lt;/P&gt;&lt;P&gt;Stored as Parquet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Noticed that we couldn't do queries like:&lt;/P&gt;&lt;P&gt;... where day &amp;gt; 10 with the string option&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:17:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Best-Data-Type-for-Hive-Date-Partition/m-p/88800#M4087</guid>
      <dc:creator>ChineduLB</dc:creator>
      <dc:date>2022-09-16T14:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Best Data Type for Hive Date Partition</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Best-Data-Type-for-Hive-Date-Partition/m-p/89092#M4088</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would suggest to use INT rather than STRING.&lt;BR /&gt;&lt;BR /&gt;Firstly, searching based INT type is faster, and secondly, like you said, you can do numeric comparison, which will be different from the STRING type comparison.</description>
      <pubDate>Sat, 13 Apr 2019 02:32:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Best-Data-Type-for-Hive-Date-Partition/m-p/89092#M4088</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2019-04-13T02:32:55Z</dc:date>
    </item>
  </channel>
</rss>

