Skip to content

Commit

Permalink
Presto "Request Header Fields Too Large"
Browse files Browse the repository at this point in the history
  • Loading branch information
mirafranc authored Feb 5, 2021
1 parent cd2fd4c commit bde84e1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions jaydebeapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,16 @@ def execute(self, operation, parameters=None):
if not parameters:
parameters = ()
self._close_last()
self._prep = self._connection.jconn.prepareStatement(operation)
self._set_stmt_parms(self._prep, parameters)
if parameters:
self._prep = self._connection.jconn.prepareStatement(operation)
self._set_stmt_parms(self._prep, parameters)
else:
self._prep = self._connection.jconn.createStatement()
try:
is_rs = self._prep.execute()
if parameters:
is_rs = self._prep.execute()
else:
is_rs = self._prep.execute(operation)
except:
_handle_sql_exception()
if is_rs:
Expand Down

0 comments on commit bde84e1

Please sign in to comment.