File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
opensearch/src/main/java/org/opensearch/sql/opensearch/executor Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -113,17 +113,19 @@ public ExplainResponseNode visitTableScan(
113
113
@ Override
114
114
public void execute (
115
115
RelNode rel , CalcitePlanContext context , ResponseListener <QueryResponse > listener ) {
116
- AccessController .doPrivileged (
117
- (PrivilegedAction <Void >)
118
- () -> {
119
- try (PreparedStatement statement = OpenSearchRelRunners .run (context , rel )) {
120
- ResultSet result = statement .executeQuery ();
121
- buildResultSet (result , rel .getRowType (), listener );
122
- return null ;
123
- } catch (SQLException e ) {
124
- throw new RuntimeException (e );
125
- }
126
- });
116
+ client .schedule (
117
+ () ->
118
+ AccessController .doPrivileged (
119
+ (PrivilegedAction <Void >)
120
+ () -> {
121
+ try (PreparedStatement statement = OpenSearchRelRunners .run (context , rel )) {
122
+ ResultSet result = statement .executeQuery ();
123
+ buildResultSet (result , rel .getRowType (), listener );
124
+ } catch (SQLException e ) {
125
+ listener .onFailure (e );
126
+ }
127
+ return null ;
128
+ }));
127
129
}
128
130
129
131
private void buildResultSet (
You can’t perform that action at this time.
0 commit comments