<?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: Difference between string and character - Impala in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158274#M120671</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3035/prakash6k.html" nodeid="3035"&gt;@prakash pal&lt;/A&gt; there are some differences between these data types, basically string allows a variable length of characters (max 32K chars), char is a fixed length string (max. 255 chars). Usually (I doubt that this is different with Impala) CHAR is more efficient and can speed up operations and is better reg. memory allocation. (This does not mean always use CHAR)&lt;/P&gt;&lt;P&gt;See this =&amp;gt;  "&lt;EM&gt;All data in CHAR and VARCHAR columns must be in a character encoding that is compatible with UTF-8. If you have binary data from another database system (that is, a BLOB type), use a STRING column to hold it."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;There are a lot of use cases where it makes sense to only use CHAR  instead of STRING, e.g. lets say you want to have a column that stores the two-letter country code (ISO_3166-1_alpha-2; e.g. US, ES, UK,...), here it makes more sense to use CHAR.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2016 21:01:55 GMT</pubDate>
    <dc:creator>jstraub</dc:creator>
    <dc:date>2016-02-25T21:01:55Z</dc:date>
    <item>
      <title>Difference between string and character - Impala</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158272#M120669</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you please explain difference between STRING and CHAR(10) datatype in impala ?&lt;/P&gt;&lt;P&gt;I understand there is no need to mention number of bytes in STRING datatype.&lt;/P&gt;&lt;P&gt;Storage,coding and performance wise which is better ?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:05:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158272#M120669</guid>
      <dc:creator>Aswanth11</dc:creator>
      <dc:date>2022-09-16T10:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between string and character - Impala</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158273#M120670</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3035/prakash6k.html" nodeid="3035"&gt;@prakash pal&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Impala is not part of HDP stack but just to help you out&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://www.cloudera.com/documentation/archive/impala/2-x/2-0-x/topics/impala_string_functions.html" target="_blank"&gt;http://www.cloudera.com/documentation/archive/impala/2-x/2-0-x/topics/impala_string_functions.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2) Char &lt;A href="http://www.cloudera.com/documentation/archive/impala/2-x/2-1-x/topics/impala_char.html" target="_blank"&gt;http://www.cloudera.com/documentation/archive/impala/2-x/2-1-x/topics/impala_char.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 20:05:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158273#M120670</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-02-25T20:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between string and character - Impala</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158274#M120671</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/3035/prakash6k.html" nodeid="3035"&gt;@prakash pal&lt;/A&gt; there are some differences between these data types, basically string allows a variable length of characters (max 32K chars), char is a fixed length string (max. 255 chars). Usually (I doubt that this is different with Impala) CHAR is more efficient and can speed up operations and is better reg. memory allocation. (This does not mean always use CHAR)&lt;/P&gt;&lt;P&gt;See this =&amp;gt;  "&lt;EM&gt;All data in CHAR and VARCHAR columns must be in a character encoding that is compatible with UTF-8. If you have binary data from another database system (that is, a BLOB type), use a STRING column to hold it."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;There are a lot of use cases where it makes sense to only use CHAR  instead of STRING, e.g. lets say you want to have a column that stores the two-letter country code (ISO_3166-1_alpha-2; e.g. US, ES, UK,...), here it makes more sense to use CHAR.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 21:01:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Difference-between-string-and-character-Impala/m-p/158274#M120671</guid>
      <dc:creator>jstraub</dc:creator>
      <dc:date>2016-02-25T21:01:55Z</dc:date>
    </item>
  </channel>
</rss>

