Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/1021#discussion_r149997750
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileUtil.java
---
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.server.rest.profile;
+
+import org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState;
+
+import java.util.Collections;
+import java.util.Map;
+
+import com.google.common.collect.Maps;
+
+public class ProfileUtil {
+ // Mapping query state names to display names
+ private static final Map<String, String> queryStateDisplayName;
+
+ static {
+ Map<String, String> displayNames = Maps.newHashMap();
--- End diff --
1. Please use `Map<QueryState, String>` since you're already receiving
`QueryState` as in parameter in method.
Besides, it would guarantee you did not make mistake writing query state
enum names.
2. `queryStateDisplayName` -> `queryStateDisplayNames`
---