Is it possible to execute CALL system.sync_partition_metadata('dummy','dummy','FULL')
using JDBC as Presto JDBC driver does not support CallableStatements?
Asked
Active
Viewed 425 times
0

mhlaskar1991
- 61
- 9
-
Why not ask on their forum? Link available on their [Presto Community](https://prestodb.io/community.html) page. – Andreas Oct 06 '20 at 12:58
1 Answers
4
Presto JDBC driver does not support io.prestosql.jdbc.PrestoConnection#prepareCall
methods (please file an issue), but you can use Statement
for this:
try (Connection connection = DriverManager.getConnection("jdbc:presto://localhost:8080/hive/default", "presto", "")) {
try (Statement statement = connection.createStatement()) {
boolean hasResultSet = statement.execute("CALL system.sync_partition_metadata('default', 'table_name', 'FULL')");
verify(!hasResultSet, "unexpected resultSet");
}
}
(BTW you can get always get more help with Presto on Trino (formerly Presto SQL) community slack)

Piotr Findeisen
- 19,480
- 2
- 52
- 82