<?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: IllegalStateException: null using first_value function (Impala 2.9.0) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64348#M74287</link>
    <description>&lt;P&gt;Thanks for your report and apologies for this issue. We're aware of the problem and are workign on a fix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/IMPALA-6473" target="_blank"&gt;https://issues.apache.org/jira/browse/IMPALA-6473&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is not a deliberate incompatibility, but simply a bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to how Impala executes analytic functions, you should be able to work around the issue by ommitting the "substr(gbm.transxref,1,(instr(gbm.transxref,'/'))-1)" portion in the ORDER BY clause of the analytic function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2018 18:19:08 GMT</pubDate>
    <dc:creator>alex.behm</dc:creator>
    <dc:date>2018-02-05T18:19:08Z</dc:date>
    <item>
      <title>IllegalStateException: null using first_value function (Impala 2.9.0)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64343#M74286</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've upgraded Impala from 2.7.0 to 2.9.0 and one of my queries stopped working after that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On running this query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;select first_value(transxref) &lt;BR /&gt;over (partition by substr(gbm.transxref,1,(instr(gbm.transxref,'/'))-1)
order by substr(gbm.transxref,1,(instr(gbm.transxref,'/'))-1), reportdate)
from gbm_partition gbm&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I &amp;nbsp;receive error: "IllegalStateException: null"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I will change order by clause and will run query below - it will work.&lt;/P&gt;&lt;PRE&gt;select first_value(transxref) &lt;BR /&gt;over (partition by substr(gbm.transxref,1,(instr(gbm.transxref,'/'))-1)
order by transxref, reportdate)
from gbm_partition gbm&lt;/PRE&gt;&lt;P&gt;1. Can anybody please suggest, if there are any incompatibilities between 2.7.0 and 2.9.0 (I haven't found anything in Release Notes)?&lt;/P&gt;&lt;P&gt;2. If there are - can anybody please suggest a workaround for this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Anastasiia&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:49:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64343#M74286</guid>
      <dc:creator>laanajar</dc:creator>
      <dc:date>2022-09-16T12:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: IllegalStateException: null using first_value function (Impala 2.9.0)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64348#M74287</link>
      <description>&lt;P&gt;Thanks for your report and apologies for this issue. We're aware of the problem and are workign on a fix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/IMPALA-6473" target="_blank"&gt;https://issues.apache.org/jira/browse/IMPALA-6473&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is not a deliberate incompatibility, but simply a bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to how Impala executes analytic functions, you should be able to work around the issue by ommitting the "substr(gbm.transxref,1,(instr(gbm.transxref,'/'))-1)" portion in the ORDER BY clause of the analytic function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 18:19:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64348#M74287</guid>
      <dc:creator>alex.behm</dc:creator>
      <dc:date>2018-02-05T18:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: IllegalStateException: null using first_value function (Impala 2.9.0)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64352#M74288</link>
      <description>&lt;P&gt;Thank you a lot for quick response!&lt;BR /&gt;&lt;BR /&gt;-------EDIT----------&lt;/P&gt;&lt;P&gt;Also, I have found a possible walk around with using&amp;nbsp;split_part() function instead of substr() - it will work for my particular case&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 21:14:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/IllegalStateException-null-using-first-value-function-Impala/m-p/64352#M74288</guid>
      <dc:creator>laanajar</dc:creator>
      <dc:date>2018-02-05T21:14:44Z</dc:date>
    </item>
  </channel>
</rss>

