You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Prabhakar Bhosaale <bh...@gmail.com> on 2021/02/25 07:25:14 UTC

Prepared statment in Drill

Hi Team,
I am integrating pentaho with Drill to create the reports on drill file
storage. I have created the view on files which are accessible in pentaho
as views.
I am trying to send the prepared statement to query these views. But it
seems Drill JDBC driver does not support prepared statements.
Any further updates on this? is there any updated JDBC driver
available which supports prepared statement?  thanks


Regards
Prabhakar

Re: Prepared statment in Drill

Posted by Prabhakar Bhosaale <bh...@gmail.com>.
Hi James,
thanks for your reply. But it is giving error

*java.sql.SQLException*: [MapR][DrillJDBCDriver](500980) Encountered error
while creating prepared statement. Details: PLAN ERROR: Cannot convert
RexNode to equivalent Drill expression. RexNode Class:
org.apache.calcite.rex.RexDynamicParam, RexNode Digest: ?0

after googling i understood that it is not supported. So just wanted to
understand is there any further updates on it? thanks

Regards
Prabhakar

On Thu, Feb 25, 2021 at 1:57 PM James Turton <ja...@somecomputer.xyz.invalid>
wrote:

> If I remember right, prepared statements will cause the JDBC driver to
> run a
>
> SELECT * from (your query) LIMIT 0
>
> for schema discovery before running your query.  As you may deduce from
> the syntax I've shown, this works but only for when your query is itself
> a SELECT.  One conclusion one could draw is: only use prepared
> statements for SELECTs.
>
> On 2021/02/25 09:25, Prabhakar Bhosaale wrote:
> > Hi Team,
> > I am integrating pentaho with Drill to create the reports on drill file
> > storage. I have created the view on files which are accessible in pentaho
> > as views.
> > I am trying to send the prepared statement to query these views. But it
> > seems Drill JDBC driver does not support prepared statements.
> > Any further updates on this? is there any updated JDBC driver
> > available which supports prepared statement?  thanks
> >
> >
> > Regards
> > Prabhakar
> >
>
>

Re: Prepared statment in Drill

Posted by luoc <lu...@apache.org>.
Thanks so much.

> 2021年2月26日 下午12:26,Prabhakar Bhosaale <bh...@gmail.com> 写道:
> 
> Hi Luoc,
> As suggested by you, I have created the JIRA. The link is
> https://issues.apache.org/jira/browse/DRILL-7870
> 
> Regards
> Prabhakar
> 
> On Thu, Feb 25, 2021 at 4:40 PM luoc <lu...@apache.org> wrote:
> 
>> Hi,
>>  It is not currently supported (See also
>> `org.apache.drill.jdbc.PreparedStatementTest#testSqlQueryWithParamNotSupported()`).
>>  However, Drill is a user-centric software. So, Would you please create a
>> JIRA on https://issues.apache.org <https://issues.apache.org/>? then we
>> will evaluate whether to develop. thanks
>> 
>>> 2021年2月25日 下午5:37,Зиновьев Олег <le...@live.ru> 写道:
>>> 
>>> Hi.
>>> 
>>> Drill does not support dynamic parameters
>>> 
>>> Kind regards,
>>> Oleg.
>>> 
>>> 25 февр. 2021 г., в 11:27, James Turton <james@somecomputer.xyz
>> .INVALID<ma...@somecomputer.xyz.INVALID>> написал(а):
>>> 
>>> If I remember right, prepared statements will cause the JDBC driver to
>> run a
>>> 
>>> SELECT * from (your query) LIMIT 0
>>> 
>>> for schema discovery before running your query.  As you may deduce from
>> the syntax I've shown, this works but only for when your query is itself a
>> SELECT.  One conclusion one could draw is: only use prepared statements for
>> SELECTs.
>>> 
>>> On 2021/02/25 09:25, Prabhakar Bhosaale wrote:
>>> Hi Team,
>>> I am integrating pentaho with Drill to create the reports on drill file
>>> storage. I have created the view on files which are accessible in pentaho
>>> as views.
>>> I am trying to send the prepared statement to query these views. But it
>>> seems Drill JDBC driver does not support prepared statements.
>>> Any further updates on this? is there any updated JDBC driver
>>> available which supports prepared statement?  thanks
>>> 
>>> 
>>> Regards
>>> Prabhakar
>>> 
>>> 
>>> 
>> 
>> 


Re: Prepared statment in Drill

Posted by Prabhakar Bhosaale <bh...@gmail.com>.
Hi Luoc,
As suggested by you, I have created the JIRA. The link is
https://issues.apache.org/jira/browse/DRILL-7870

Regards
Prabhakar

On Thu, Feb 25, 2021 at 4:40 PM luoc <lu...@apache.org> wrote:

> Hi,
>   It is not currently supported (See also
> `org.apache.drill.jdbc.PreparedStatementTest#testSqlQueryWithParamNotSupported()`).
>   However, Drill is a user-centric software. So, Would you please create a
> JIRA on https://issues.apache.org <https://issues.apache.org/>? then we
> will evaluate whether to develop. thanks
>
> > 2021年2月25日 下午5:37,Зиновьев Олег <le...@live.ru> 写道:
> >
> > Hi.
> >
> > Drill does not support dynamic parameters
> >
> > Kind regards,
> > Oleg.
> >
> > 25 февр. 2021 г., в 11:27, James Turton <james@somecomputer.xyz
> .INVALID<ma...@somecomputer.xyz.INVALID>> написал(а):
> >
> > If I remember right, prepared statements will cause the JDBC driver to
> run a
> >
> > SELECT * from (your query) LIMIT 0
> >
> > for schema discovery before running your query.  As you may deduce from
> the syntax I've shown, this works but only for when your query is itself a
> SELECT.  One conclusion one could draw is: only use prepared statements for
> SELECTs.
> >
> > On 2021/02/25 09:25, Prabhakar Bhosaale wrote:
> > Hi Team,
> > I am integrating pentaho with Drill to create the reports on drill file
> > storage. I have created the view on files which are accessible in pentaho
> > as views.
> > I am trying to send the prepared statement to query these views. But it
> > seems Drill JDBC driver does not support prepared statements.
> > Any further updates on this? is there any updated JDBC driver
> > available which supports prepared statement?  thanks
> >
> >
> > Regards
> > Prabhakar
> >
> >
> >
>
>

Re: Prepared statment in Drill

Posted by luoc <lu...@apache.org>.
Hi,
  It is not currently supported (See also `org.apache.drill.jdbc.PreparedStatementTest#testSqlQueryWithParamNotSupported()`).
  However, Drill is a user-centric software. So, Would you please create a JIRA on https://issues.apache.org <https://issues.apache.org/>? then we will evaluate whether to develop. thanks

> 2021年2月25日 下午5:37,Зиновьев Олег <le...@live.ru> 写道:
> 
> Hi.
> 
> Drill does not support dynamic parameters
> 
> Kind regards,
> Oleg.
> 
> 25 февр. 2021 г., в 11:27, James Turton <ja...@somecomputer.xyz.INVALID>> написал(а):
> 
> If I remember right, prepared statements will cause the JDBC driver to run a
> 
> SELECT * from (your query) LIMIT 0
> 
> for schema discovery before running your query.  As you may deduce from the syntax I've shown, this works but only for when your query is itself a SELECT.  One conclusion one could draw is: only use prepared statements for SELECTs.
> 
> On 2021/02/25 09:25, Prabhakar Bhosaale wrote:
> Hi Team,
> I am integrating pentaho with Drill to create the reports on drill file
> storage. I have created the view on files which are accessible in pentaho
> as views.
> I am trying to send the prepared statement to query these views. But it
> seems Drill JDBC driver does not support prepared statements.
> Any further updates on this? is there any updated JDBC driver
> available which supports prepared statement?  thanks
> 
> 
> Regards
> Prabhakar
> 
> 
> 


Re: Prepared statment in Drill

Posted by Зиновьев Олег <le...@live.ru>.
Hi.

Drill does not support dynamic parameters

Kind regards,
Oleg.

25 февр. 2021 г., в 11:27, James Turton <ja...@somecomputer.xyz.INVALID>> написал(а):

If I remember right, prepared statements will cause the JDBC driver to run a

SELECT * from (your query) LIMIT 0

for schema discovery before running your query.  As you may deduce from the syntax I've shown, this works but only for when your query is itself a SELECT.  One conclusion one could draw is: only use prepared statements for SELECTs.

On 2021/02/25 09:25, Prabhakar Bhosaale wrote:
Hi Team,
I am integrating pentaho with Drill to create the reports on drill file
storage. I have created the view on files which are accessible in pentaho
as views.
I am trying to send the prepared statement to query these views. But it
seems Drill JDBC driver does not support prepared statements.
Any further updates on this? is there any updated JDBC driver
available which supports prepared statement?  thanks


Regards
Prabhakar




Re: Prepared statment in Drill

Posted by James Turton <ja...@somecomputer.xyz.INVALID>.
If I remember right, prepared statements will cause the JDBC driver to 
run a

SELECT * from (your query) LIMIT 0

for schema discovery before running your query.  As you may deduce from 
the syntax I've shown, this works but only for when your query is itself 
a SELECT.  One conclusion one could draw is: only use prepared 
statements for SELECTs.

On 2021/02/25 09:25, Prabhakar Bhosaale wrote:
> Hi Team,
> I am integrating pentaho with Drill to create the reports on drill file
> storage. I have created the view on files which are accessible in pentaho
> as views.
> I am trying to send the prepared statement to query these views. But it
> seems Drill JDBC driver does not support prepared statements.
> Any further updates on this? is there any updated JDBC driver
> available which supports prepared statement?  thanks
>
>
> Regards
> Prabhakar
>