From 39c776a3c97a6db8f8fc399f5d6afbb6cc47e1d2 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Tue, 12 Dec 2023 09:43:13 -0500 Subject: [PATCH] ESQL: Remove unused StringBuilder It's a small thing but it saves an extra copy that we don't need and makes the code easier to read. --- .../xpack/esql/planner/LocalExecutionPlanner.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java index e4e2402a9c7a3..a07f3f68996d3 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java @@ -814,9 +814,7 @@ public List createDrivers(String sessionId) { @Override public String describe() { - StringBuilder sb = new StringBuilder(); - sb.append(driverFactories.stream().map(DriverFactory::describe).collect(joining("\n"))); - return sb.toString(); + return driverFactories.stream().map(DriverFactory::describe).collect(joining("\n")); } } }