Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EXECUTE IMMEDIATE #128

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

nineinchnick
Copy link
Member

@nineinchnick nineinchnick commented Oct 6, 2024

Use EXECUTE IMMEDIATE sent in the HTTP request body, instead of putting the query text in HTTP headers. This should allow sending large query text. It can be enabled by setting the explicitPrepare option to false in the connection string.

Fixes #123 and fixes #118

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the driver will error with older servers unless explicitPrepare is explicitly set, do we have some sort of release notes?

@nineinchnick
Copy link
Member Author

Nope, you need to enable explicitPrepare to use EXECUTE IMMEDIATE, it's off by default, same as in the JDBC driver.

For tracking breaking changes in release notes, I'm adding more configuration in #127

@hashhar
Copy link
Member

hashhar commented Oct 7, 2024

Nope, you need to enable explicitPrepare to use EXECUTE IMMEDIATE, it's off by default, same as in the JDBC driver.

I see now but the comment is confusing - useExplicitPrepare = true by default in TrinoConnection which means we default to using explicit prepare.

@hashhar
Copy link
Member

hashhar commented Oct 7, 2024

It can be enabled by setting the explicitPrepare option to true in the connection string.

Should be It can be enabled by setting the explicitPrepare option to false in the connection string..

@nineinchnick
Copy link
Member Author

I might have messed it up because I initially assumed the JDBC driver would have this turned on by default, only to later notice it's the opposite, so I also changed it here accordingly. Will double-check, thanks for noticing!

@hashhar
Copy link
Member

hashhar commented Oct 7, 2024

the implementation seems correct, just the PR description seems wrong/

Use EXECUTE IMMEDIATE sent in the HTTP request body, instead of putting
the query text in HTTP headers. This should allow sending large query
text. It can be enabled by setting the `explicitPrepare` option to
false in the connection string.
@nineinchnick nineinchnick merged commit 467db65 into trinodb:master Oct 9, 2024
5 checks passed
@nineinchnick nineinchnick deleted the execute-immediate branch October 9, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants