[ https://issues.apache.org/jira/browse/QPID-8581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532796#comment-17532796 ]
ASF GitHub Bot commented on QPID-8581: -------------------------------------- dakirily commented on code in PR #121: URL: https://github.com/apache/qpid-broker-j/pull/121#discussion_r866737563 ########## broker-plugins/broker-query-engine/src/main/java/org/apache/qpid/server/query/engine/evaluator/EvaluationContext.java: ########## @@ -0,0 +1,154 @@ +/* + * + * 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.qpid.server.query.engine.evaluator; + +import java.util.Deque; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.qpid.server.query.engine.parsing.expression.Expression; +import org.apache.qpid.server.query.engine.parsing.query.QueryExpression; + +/** + * Holds temporary values needed during query evaluation + */ +@SuppressWarnings({"java:S116", "unchecked"}) +public class EvaluationContext +{ + public static final String BROKER = "broker"; + + public static final String STATISTICS = "statistics"; + + public static final String QUERY_AGGREGATED_RESULT = "query.aggregated.result"; + + public static final String QUERY_ALIASES = "query.aliases"; + + public static final String QUERY_DATETIME_PATTERN_OVERRIDEN = "query.datetime.pattern.overriden"; + + public static final String QUERY_DEPTH = "query.depth"; + + public static final String QUERY_ORDERING = "query.ordering"; + + public static final String QUERY_ITEMS_FOR_REMOVAL = "query.items.for.removal"; + + public static final String QUERY_ORDER_ITEMS_FOR_REMOVAL = "query.order.items.for.removal"; + + public static final String QUERY_SETTINGS = "query.settings"; + + public static final String COMPARATORS = "comparators"; + + private final Map<Object, Object> _values = new HashMap<>(); Review Comment: HashMap was replaced with ConcurrentHashMap > [Broker-J] Broker-J Query REST API improvements > ----------------------------------------------- > > Key: QPID-8581 > URL: https://issues.apache.org/jira/browse/QPID-8581 > Project: Qpid > Issue Type: Improvement > Components: Broker-J > Affects Versions: qpid-java-broker-8.0.6 > Reporter: Daniil Kirilyuk > Priority: Minor > > Existing broker REST API (including broker query API) doesn’t support such > functions as aggregation, grouping and using nested logical operators, which > could be useful for gathering broker statistics and reporting. > We suggest to add a new POST method for the endpoint /api/latest/querybroker > and supply search criteria using JSON body. (Existing GET method > implementation should stay without changes for keeping backwards > compatibility and because of difficulties of parsing complicated search > conditions from URI parameters when using GET request method). > The new functionality should add > * logical OR operator (absent in current API) > * aggregation operators AVG, CNT, MAX, MIN, SUM > * grouping aggregation > * new numeric / datetime / string functions -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org