impala-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mostafa Mokhtar <>
Subject Re: Using comments in query for detailed monitoring
Date Thu, 14 Dec 2017 07:30:51 GMT
+1 on what Alex recommends. 
Highly recommend using useNativeQuery=1 all the time. 


> On Dec 13, 2017, at 9:42 PM, Alexander Behm <> wrote:
> Not sure if this will work, but you could try enabling useNativeQuery in the driver.
Theoretically that should send the query string including comments verbatim to Impala.
>> On Wed, Dec 13, 2017 at 7:57 PM, Philip Zeyliger <> wrote:
>> I’m a little surprised comments are being stripped, but adding (1=1 or “”=“your
comment”) to a where clause would work similarly. Impala will simplify that away during
query compilation. 
>> P
>>> On Wed, Dec 13, 2017 at 7:22 PM Sunil Parmar <> wrote:
>>> Server version: impalad version 2.9.0-cdh5.12.1 RELEASE (build 5131a031f4aa38c1e50c430373c55ca53e0517b9)
>>> One of the primary use of of Impala is it acts as a backend to a web application
exposed to lot of users. We are trying to build monitoring metrics per web page, logged in
user and other things that are not typically supplied in the query string. We were thinking
to use query comments to pass such information along with query. It worked fine when query
is executed using impala-shell; I can see the comments in the impala monitoring page i.e.
on port #25000 but when comments are sent over JDBC ; they're not visible to Impalad. 
>>> 1. Is there an configuration in Impala driver ? We're using 
>>>      <dependency>
>>>       <groupId>com.cloudera.impala</groupId>
>>>       <artifactId>impala-jdbc</artifactId>
>>>       <version>2.5.30</version>
>>>       <scope>compile</scope>
>>>     </dependency>
>>> 2. Is there any other way to send such hints along with query ?
>>> Thanks,
>>> Sunil

View raw message