How to tell SQL Workbench to not call Statement.setEscapeProcessing() method when it executes statements?

128 views
Skip to first unread message

Alexander Pivovarov

unread,
Aug 11, 2014, 2:47:00 PM8/11/14
to sql-wo...@googlegroups.com
SQL Workbench calls setEscapeProcessing()  when I run "create table" statement 

The JDBC driver I'm using (hive) does not support this method (throws Method Not Supported Exception)

Is There a way to configure SQL Workbench  to NOT call this method?

Maybe some feature from the list of supported features in Database Metadata should return some particular value so that SQL Workbench does not call setEscapeProcessing?

Thomas Kellerer

unread,
Aug 11, 2014, 3:07:37 PM8/11/14
to sql-wo...@googlegroups.com


Alexander Pivovarov wrote on 11.08.2014 20:47:
> SQL Workbench calls setEscapeProcessing() when I run "create table" statement
>
> The JDBC driver I'm using (hive) does not support this method (throws Method Not Supported Exception)
>
> Is There a way to configure SQL Workbench to NOT call this method?

Yes, you can set the property workbench.db.[dbid].ddl.disable.escapeprocessing to false, e.g. by using the following SQL statement

WbSetConfig workbench.db.[dbid].ddl.disable.escapeprocessing=false;

you need to replace [dbid] with the DBID that is generated for Hive. For details on the DBID please see here:

http://www.sql-workbench.net/manual/settings.html#dbid

Regards
Thomas

> Maybe some feature from the list of supported features in Database Metadata should return some particular value so that SQL Workbench
>does not call setEscapeProcessing?

setEscapeProcessing() is a required method and a driver not implementing it does not comply with the JDBC specification.

Regards
Thomas

Alexander Pivovarov

unread,
Aug 11, 2014, 3:19:32 PM8/11/14
to sql-wo...@googlegroups.com
Thomas, thank you for quick reply

I looked at SQL workbench code and see that if it calls the method it calls it with "false" argument.

Probably I'll fix hive jdbc driver to do nothing if method is called with "false" argument.

Alexander Pivovarov

unread,
Aug 11, 2014, 4:57:35 PM8/11/14
to sql-wo...@googlegroups.com
I created the patch for hive JDBC to fix the issue
another related patch
Reply all
Reply to author
Forward
0 new messages