<?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: Impala query with limit 0 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331366#M230872</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/91324"&gt;@npr73&lt;/a&gt;,&amp;nbsp;have any of the replies 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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 06:46:04 GMT</pubDate>
    <dc:creator>VidyaSargur</dc:creator>
    <dc:date>2021-12-01T06:46:04Z</dc:date>
    <item>
      <title>Impala query with limit 0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/330682#M230723</link>
      <description>&lt;P&gt;I see some query submitted to Impala with "LIMIT 0' at the end which obviously do not return any rows. It seems like these queries are coming from IBM Datastage. I am from Production support team and I monitor such queries. i know we can use limit 10 or so to limit the number of rows returned but why on the earth someone wants to limit to 0? Is it just to check the syntax of query or connection or something? Before I question the team who submits such query, wanted to double check if there is any reason one would like to say limit 0 at the end.&amp;nbsp; official documentation at&amp;nbsp;&lt;A href="https://impala.apache.org/docs/build/html/topics/impala_limit.html" target="_self"&gt;official impala document&lt;/A&gt;&amp;nbsp; does not say any thing about it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 05:37:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/330682#M230723</guid>
      <dc:creator>npr73</dc:creator>
      <dc:date>2021-11-22T05:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Impala query with limit 0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331036#M230807</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This use case seems to be similar to queries which have a filter "WHERE 1=0" - those also do not return any data.&lt;/P&gt;&lt;P&gt;See for example such a discussion why that is needed/used in some places:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/9140606/why-would-you-use-where-1-0-statement-in-sql" target="_blank"&gt;https://stackoverflow.com/questions/9140606/why-would-you-use-where-1-0-statement-in-sql&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My best guess would be that the application calling such queries needs the schema of the result set in advance - for example to create and render the layout (columns) or autofilters or to prepare another subsequent query properly (for example it has to do some decisions - which filters the next query needs to contain, maybe they are different for a string and for a date column, etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;Miklos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Miklos Szurap&lt;/P&gt;&lt;P&gt;Customer Operations Engineer, Cloudera&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 09:19:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331036#M230807</guid>
      <dc:creator>mszurap</dc:creator>
      <dc:date>2021-11-25T09:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Impala query with limit 0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331037#M230808</link>
      <description>&lt;P&gt;From where the query is submitted[Jdbc/ODBC, Impala-shell, Hue]. If it is from JDBC/ODBC then&lt;SPAN&gt;&amp;nbsp;the query is generated to figure out column names. You can disable the feature that generates it with the PreparedMetadataLimitZero flag - see [page 90]&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.cloudera.com/documentation/other/connectors/impala-jdbc/latest/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf" target="_blank" rel="noopener noreferrer"&gt;https://www.cloudera.com/documentation/other/connectors/impala-jdbc/latest/Cloudera-JDBC-Driver-for-...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 09:23:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331037#M230808</guid>
      <dc:creator>ShankerSharma</dc:creator>
      <dc:date>2021-11-25T09:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Impala query with limit 0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331366#M230872</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/91324"&gt;@npr73&lt;/a&gt;,&amp;nbsp;have any of the replies 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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 06:46:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-query-with-limit-0/m-p/331366#M230872</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2021-12-01T06:46:04Z</dc:date>
    </item>
  </channel>
</rss>

