Class AbstractQueryHandler
- java.lang.Object
-
- org.apache.iotdb.db.protocol.influxdb.handler.AbstractQueryHandler
-
- Direct Known Subclasses:
NewQueryHandler,QueryHandler
public abstract class AbstractQueryHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanMergeOperator(FilterOperator operator)judge whether the subtrees of the syntax tree have or operations.voidcheckInfluxDBQueryOperator(Operator operator)java.util.List<org.apache.iotdb.tsfile.read.expression.IExpression>getIExpressionByFilterOperatorOperator(FilterOperator filterOperator)generate query conditions through the syntax tree (if you enter this function, it means that it must be a syntax tree that can be merged, and there is no or)org.apache.iotdb.tsfile.read.expression.IExpressiongetIExpressionForBasicFunctionOperator(BasicFunctionOperator basicFunctionOperator)conditions are generated from subtrees of unique conditionsvoidProcessSelectComponent(org.influxdb.dto.QueryResult queryResult, InfluxSelectComponent selectComponent)further process the obtained query result through the query criteria of selectorg.influxdb.dto.QueryResultqueryExpr(FilterOperator operator, java.lang.String database, java.lang.String measurement, ServiceProvider serviceProvider, java.util.Map<java.lang.String,java.lang.Integer> fieldOrders, java.lang.Long sessionId)org.influxdb.dto.QueryResultqueryFuncWithoutFilter(InfluxSelectComponent selectComponent, java.lang.String database, java.lang.String measurement, ServiceProvider serviceProvider, long sessionid)Query the select result.org.apache.iotdb.protocol.influxdb.rpc.thrift.InfluxQueryResultRspqueryInfluxDB(java.lang.String database, InfluxQueryOperator queryOperator, long sessionId, ServiceProvider serviceProvider)
-
-
-
Method Detail
-
queryInfluxDB
public final org.apache.iotdb.protocol.influxdb.rpc.thrift.InfluxQueryResultRsp queryInfluxDB(java.lang.String database, InfluxQueryOperator queryOperator, long sessionId, ServiceProvider serviceProvider)
-
getIExpressionForBasicFunctionOperator
public org.apache.iotdb.tsfile.read.expression.IExpression getIExpressionForBasicFunctionOperator(BasicFunctionOperator basicFunctionOperator)
conditions are generated from subtrees of unique conditions- Parameters:
basicFunctionOperator- subtree to generate condition- Returns:
- corresponding conditions
-
ProcessSelectComponent
public void ProcessSelectComponent(org.influxdb.dto.QueryResult queryResult, InfluxSelectComponent selectComponent)further process the obtained query result through the query criteria of select- Parameters:
queryResult- query results to be processedselectComponent- select conditions to be filtered
-
queryFuncWithoutFilter
public final org.influxdb.dto.QueryResult queryFuncWithoutFilter(InfluxSelectComponent selectComponent, java.lang.String database, java.lang.String measurement, ServiceProvider serviceProvider, long sessionid)
Query the select result. By default, there are no filter conditions. The functions to be queried use the built-in iotdb functions- Parameters:
selectComponent- select data to query- Returns:
- select query result
-
queryExpr
public org.influxdb.dto.QueryResult queryExpr(FilterOperator operator, java.lang.String database, java.lang.String measurement, ServiceProvider serviceProvider, java.util.Map<java.lang.String,java.lang.Integer> fieldOrders, java.lang.Long sessionId) throws org.apache.iotdb.commons.auth.AuthException
- Throws:
org.apache.iotdb.commons.auth.AuthException
-
getIExpressionByFilterOperatorOperator
public java.util.List<org.apache.iotdb.tsfile.read.expression.IExpression> getIExpressionByFilterOperatorOperator(FilterOperator filterOperator)
generate query conditions through the syntax tree (if you enter this function, it means that it must be a syntax tree that can be merged, and there is no or)- Parameters:
filterOperator- the syntax tree of query criteria needs to be generated- Returns:
- condition list
-
canMergeOperator
public boolean canMergeOperator(FilterOperator operator)
judge whether the subtrees of the syntax tree have or operations. If not, the query can be merged- Parameters:
operator- subtree to judge- Returns:
- can merge queries
-
checkInfluxDBQueryOperator
public void checkInfluxDBQueryOperator(Operator operator)
-
-