<?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: Hive  3.1.3 - Empty files not generated when no rows returns in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380508#M244077</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/108239"&gt;@RS_11&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I grasp your inquiry accurately, you are referring to the behavior in older CDH versions (specifically 5.x), where executing &lt;STRONG&gt;insert overwrite&lt;/STRONG&gt; with a selection of 0 rows resulted in the creation of a 0-byte file named 000000_0. However, in the newer Hive version 3.1.3, you observe that &lt;STRONG&gt;no&lt;/STRONG&gt; 0-byte files are generated in such scenarios.&lt;/P&gt;&lt;P&gt;Assuming my understanding is correct, may I ask why there is a desire to generate a 0-byte file? Having 0-byte or small files is deemed inefficient. It's noteworthy that there have been various changes in the past related to 0-byte files, as documented in the following issues:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-22941" target="_new"&gt;HIVE-22941&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-21714" target="_new"&gt;HIVE-21714&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 07 Dec 2023 19:34:12 GMT</pubDate>
    <dc:creator>cravani</dc:creator>
    <dc:date>2023-12-07T19:34:12Z</dc:date>
    <item>
      <title>Hive  3.1.3 - Empty files not generated when no rows returns</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380487#M244067</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;We've done a recent upgrade from&amp;nbsp;Hive 1.1.0-cdh5.16.2 to Hive 3.1.3 and have noticed the difference in behaviour when no rows have been returned and file generation.&lt;BR /&gt;&lt;BR /&gt;On the older version (Hive 1.1.0-cdh5.16.2) it use to create empty part files (000000_0) whereas since the upgrade this isn't the case.&lt;/P&gt;&lt;P&gt;The command to run this is beeline and the sql statement starts like:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Insert overwrite  directory &lt;/SPAN&gt;&lt;SPAN&gt;'some/path'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;ROW FORMAT DELIMITED FIELDS TERMINATED BY &lt;/SPAN&gt;&lt;SPAN&gt;'|'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I cannot find any definitive documentation to saw this behaviour does not exist in later versions like Hive 3.1.3&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Dec 2023 15:30:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380487#M244067</guid>
      <dc:creator>RS_11</dc:creator>
      <dc:date>2023-12-07T15:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  3.1.3 - Empty files not generated when no rows returns</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380506#M244075</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/108239"&gt;@RS_11&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our Hive experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70785"&gt;@Shmoo&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38161"&gt;@cravani&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 17:59:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380506#M244075</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-12-07T17:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  3.1.3 - Empty files not generated when no rows returns</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380508#M244077</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/108239"&gt;@RS_11&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I grasp your inquiry accurately, you are referring to the behavior in older CDH versions (specifically 5.x), where executing &lt;STRONG&gt;insert overwrite&lt;/STRONG&gt; with a selection of 0 rows resulted in the creation of a 0-byte file named 000000_0. However, in the newer Hive version 3.1.3, you observe that &lt;STRONG&gt;no&lt;/STRONG&gt; 0-byte files are generated in such scenarios.&lt;/P&gt;&lt;P&gt;Assuming my understanding is correct, may I ask why there is a desire to generate a 0-byte file? Having 0-byte or small files is deemed inefficient. It's noteworthy that there have been various changes in the past related to 0-byte files, as documented in the following issues:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-22941" target="_new"&gt;HIVE-22941&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-21714" target="_new"&gt;HIVE-21714&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 07 Dec 2023 19:34:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380508#M244077</guid>
      <dc:creator>cravani</dc:creator>
      <dc:date>2023-12-07T19:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  3.1.3 - Empty files not generated when no rows returns</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380673#M244131</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/108239"&gt;@RS_11&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 22:00:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-3-1-3-Empty-files-not-generated-when-no-rows-returns/m-p/380673#M244131</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2023-12-11T22:00:06Z</dc:date>
    </item>
  </channel>
</rss>

