Handle SQL execution timeouts for verifier rewrite
@@ -36,6 +36,7 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.SimpleTimeLimiter;
import com.google.common.util.concurrent.TimeLimiter;
+import com.google.common.util.concurrent.UncheckedTimeoutException;
import io.airlift.units.Duration;
import java.sql.Connection;
@@ -223,6 +224,9 @@ public class QueryRewriter
columns.add(new Column(name, APPROXIMATE_TYPES.contains(type)));
}
}
+ catch (UncheckedTimeoutException e) {
+ throw new SQLException("SQL statement execution timed out", e);
+ }
finally {
executor.shutdownNow();
}
