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 @@ -111,17 +111,19 @@ public ExplainResponseNode visitTableScan(
111
111
@ Override
112
112
public void execute (
113
113
RelNode rel , CalcitePlanContext context , ResponseListener <QueryResponse > listener ) {
114
- AccessController .doPrivileged (
115
- (PrivilegedAction <Void >)
116
- () -> {
117
- try (PreparedStatement statement = OpenSearchRelRunners .run (context , rel )) {
118
- ResultSet result = statement .executeQuery ();
119
- buildResultSet (result , rel .getRowType (), listener );
120
- return null ;
121
- } catch (SQLException e ) {
122
- throw new RuntimeException (e );
123
- }
124
- });
114
+ client .schedule (
115
+ () ->
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
+ } catch (SQLException e ) {
123
+ listener .onFailure (e );
124
+ }
125
+ return null ;
126
+ }));
125
127
}
126
128
127
129
private void buildResultSet (
You can’t perform that action at this time.
0 commit comments