You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into an issue where trino/hive will not allow the use of the EXECUTE OPTIMIZE command with parameters.
When running the following from either my job scheduler of choice or manually in the CLI
PREPARE reshuffle FROM ALTER TABLE example_table EXECUTE OPTIMIZE WHERE value = ?
EXECUTE reshuffle USING 'some value'
I get this error message: Query __query_id__ failed: Incorrect number of parameters: expected 0 but found 1
However when I run just
ALTERTABLE example_table EXECUTE OPTIMIZE WHERE value ='some value'
it executes just fine.
Running the prepare statement on its own yields no errors either. Trino seems to consume and prepare everything just fine.
Its only when attempting to execute it that the issue shows up.
While I can work around this issue in my specific application, this is strange behavior since the documentation (both for version 380 and the current release) says nothing about this and even implies that it should work.
The text was updated successfully, but these errors were encountered:
While the mentioned issue contains a more in depth exploration of the issue, including a potential root cause identification and solution, it is also a year old and hasn't received any activity in that time.
I think this issue should remain open to help bring the problem back to the surface, otherwise it will never see the light of day again.
Trino Version: 380
Connector: Hive
I've run into an issue where trino/hive will not allow the use of the EXECUTE OPTIMIZE command with parameters.
When running the following from either my job scheduler of choice or manually in the CLI
I get this error message:
Query __query_id__ failed: Incorrect number of parameters: expected 0 but found 1
However when I run just
it executes just fine.
Running the prepare statement on its own yields no errors either. Trino seems to consume and prepare everything just fine.
Its only when attempting to execute it that the issue shows up.
While I can work around this issue in my specific application, this is strange behavior since the documentation (both for version 380 and the current release) says nothing about this and even implies that it should work.
The text was updated successfully, but these errors were encountered: