File tree Expand file tree Collapse file tree 4 files changed +6
-13
lines changed
antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql
datanode/src/main/java/org/apache/iotdb/db/queryengine/plan
relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql Expand file tree Collapse file tree 4 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -552,7 +552,7 @@ verifyConnection
552552
553553// ---- Remove DataNode
554554removeDataNode
555- : REMOVE DATANODE dataNodeId=INTEGER_LITERAL ( COMMA dataNodeId= INTEGER_LITERAL )*
555+ : REMOVE DATANODE dataNodeId=INTEGER_LITERAL
556556 ;
557557
558558// ---- Remove ConfigNode
Original file line number Diff line number Diff line change 239239import com .google .common .collect .ImmutableSet ;
240240import com .google .common .io .BaseEncoding ;
241241import org .antlr .v4 .runtime .Token ;
242- import org .antlr .v4 .runtime .tree .ParseTree ;
243242import org .antlr .v4 .runtime .tree .TerminalNode ;
244243import org .apache .commons .lang3 .StringUtils ;
245244import org .apache .tsfile .common .conf .TSFileDescriptor ;
@@ -4226,12 +4225,9 @@ public Statement visitRemoveRegion(IoTDBSqlParser.RemoveRegionContext ctx) {
42264225
42274226 @ Override
42284227 public Statement visitRemoveDataNode (IoTDBSqlParser .RemoveDataNodeContext ctx ) {
4229- List <Integer > dataNodeIDs =
4230- ctx .INTEGER_LITERAL ().stream ()
4231- .map (ParseTree ::getText )
4232- .map (Integer ::parseInt )
4233- .collect (Collectors .toList ());
4234- return new RemoveDataNodeStatement (dataNodeIDs );
4228+ List <Integer > nodeIds =
4229+ Collections .singletonList (Integer .parseInt (ctx .INTEGER_LITERAL ().getText ()));
4230+ return new RemoveDataNodeStatement (nodeIds );
42354231 }
42364232
42374233 @ Override
Original file line number Diff line number Diff line change @@ -1185,10 +1185,7 @@ public Node visitRemoveRegionStatement(RelationalSqlParser.RemoveRegionStatement
11851185 @ Override
11861186 public Node visitRemoveDataNodeStatement (RelationalSqlParser .RemoveDataNodeStatementContext ctx ) {
11871187 List <Integer > nodeIds =
1188- ctx .INTEGER_VALUE ().stream ()
1189- .map (TerminalNode ::getText )
1190- .map (Integer ::valueOf )
1191- .collect (Collectors .toList ());
1188+ Collections .singletonList (Integer .parseInt (ctx .INTEGER_VALUE ().getText ()));
11921189 return new RemoveDataNode (nodeIds );
11931190 }
11941191
Original file line number Diff line number Diff line change @@ -497,7 +497,7 @@ removeRegionStatement
497497 ;
498498
499499removeDataNodeStatement
500- : REMOVE DATANODE dataNodeId=INTEGER_VALUE ( ' , ' dataNodeId= INTEGER_VALUE )*
500+ : REMOVE DATANODE dataNodeId=INTEGER_VALUE
501501 ;
502502
503503removeConfigNodeStatement
You can’t perform that action at this time.
0 commit comments