|
NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
#include <Query.hpp>
Public Member Functions | |
| Query (const Query &) | |
| virtual | ~Query ()=default |
| WindowOperatorBuilder::WindowedQuery | window (Windowing::WindowTypePtr const &windowType) |
| JoinOperatorBuilder::Join | joinWith (const Query &subQueryRhs) |
| can be called on the original query with the query to be joined with and sets this query in the class Join. More... | |
| NES::Experimental::BatchJoinOperatorBuilder::Join | batchJoinWith (const Query &subQueryRhs) |
| can be called on the original query with the query to be joined with and sets this query in the class BatchJoinOperatorBuilder::Join. More... | |
| CrossJoinOperatorBuilder::CrossJoin | crossJoinWith (const Query &subQueryRhs) |
| can be called on the original query with the query to be cross joined with and sets this query in the class CrossJoinOperatorBuilder::Join. More... | |
| IntervalJoinOperatorBuilder::IntervalJoin | intervalJoinWith (const Query &subQueryRhs) |
| can be called on the original query with the query to be joined with and sets this query in the class IntervalJoinOperatorBuilder::Join. More... | |
| CEPOperatorBuilder::And | andWith (const Query &subQueryRhs) |
| can be called on the original query with the query to be composed with and sets this query in the class And. More... | |
| CEPOperatorBuilder::Seq | seqWith (const Query &subQueryRhs) |
| can be called on the original query with the query to be composed with and sets this query in the class Join. More... | |
| CEPOperatorBuilder::Times | times (const uint64_t minOccurrences, const uint64_t maxOccurrences) |
| can be called on the original query to detect an number event occurrences between minOccurrence and maxOccurrence in a stream More... | |
| CEPOperatorBuilder::Times | times (const uint64_t occurrences) |
| can be called on the original query to detect an exact number event occurrences in a stream More... | |
| CEPOperatorBuilder::Times | times () |
| can be called on the original query to detect multiple occurrences of specified events in a stream More... | |
| Query & | orWith (const Query &subQuery) |
| can be called on the original query with the query to be composed with and sets this query in the class Or. More... | |
| Query & | buildStatistic (Windowing::WindowTypePtr window, Statistic::WindowStatisticDescriptorPtr statisticDescriptor, Statistic::StatisticMetricHash metricHash, Statistic::SendingPolicyPtr sendingPolicy, Statistic::TriggerConditionPtr triggerCondition) |
| Add a synopsis build operator to the query. More... | |
| Query & | unionWith (const Query &subQuery) |
| template<typename... Args> | |
| auto | project (Args &&... args) -> std::enable_if_t< std::conjunction_v< std::is_constructible< ExpressionItem, Args >... >, Query & > |
| this call projects out the attributes in the parameter list More... | |
| Query & | project (std::vector< ExpressionNodePtr > expressions) |
| this call projects out the attributes in the parameter list More... | |
| Query & | as (std::string const &newSourceName) |
| Query & | filter (ExpressionNodePtr const &filterExpression) |
| : Filter records according to the predicate. An examplary usage would be: filter(Attribute("f1" < 10)) More... | |
| Query & | limit (const uint64_t limit) |
| : Limit the number of records according to the limit count. More... | |
| Query & | assignWatermark (Windowing::WatermarkStrategyDescriptorPtr const &watermarkStrategyDescriptor) |
| : Create watermark assigner operator. More... | |
| Query & | mapUDF (Catalogs::UDF::UDFDescriptorPtr const &descriptor) |
| : Create map java udf operator. More... | |
| Query & | flatMapUDF (Catalogs::UDF::UDFDescriptorPtr const &descriptor) |
| : Create flat map java udf operator. More... | |
| Query & | map (FieldAssignmentExpressionNodePtr const &mapExpression) |
| : Map records according to a map expression. An examplary usage would be: map(Attribute("f2") = Attribute("f1") * 42 ) More... | |
| Query & | inferModel (std::string model, std::initializer_list< ExpressionItem > inputFields, std::initializer_list< ExpressionItem > outputFields) |
| virtual Query & | sink (SinkDescriptorPtr sinkDescriptor, WorkerId workerId=INVALID_WORKER_NODE_ID) |
| Add sink operator for the query. The Sink operator is defined by the sink descriptor, which represents the semantic of this sink. More... | |
| QueryPlanPtr | getQueryPlan () const |
| Gets the query plan from the current query. More... | |
| Query (QueryPlanPtr queryPlan) | |
Static Public Member Functions | |
| static Query | from (std::string const &sourceName) |
| : Creates a query from a particular source. The source is identified by its name. During query processing the underlying source descriptor is retrieved from the source catalog. More... | |
Protected Attributes | |
| QueryPlanPtr | queryPlan |
User interface to create stream processing queryIdAndCatalogEntryMapping. The current api exposes method to create queryIdAndCatalogEntryMapping using all currently supported operators.
|
default |
|
virtualdefault |
| NES::Query::Query | ( | QueryPlanPtr | queryPlan | ) |
| CEPOperatorBuilder::And NES::Query::andWith | ( | const Query & | subQueryRhs | ) |
can be called on the original query with the query to be composed with and sets this query in the class And.
| subQueryRhs |
Referenced by TEST_F(), NES::TEST_F(), and NES::CEPOperatorBuilder::And::window().
| Query & NES::Query::as | ( | std::string const & | newSourceName | ) |
This looks ugly, but we can't reference to QueryPtr at this line.
| new | source name |
References NES_DEBUG, and queryPlan.
Referenced by NES::RequestProcessor::TEST_F().
| Query & NES::Query::assignWatermark | ( | Windowing::WatermarkStrategyDescriptorPtr const & | watermarkStrategyDescriptor | ) |
: Create watermark assigner operator.
| watermarkStrategyDescriptor |
References NES_DEBUG, and queryPlan.
Referenced by NES::TEST_P().
| NES::Experimental::BatchJoinOperatorBuilder::Join NES::Query::batchJoinWith | ( | const Query & | subQueryRhs | ) |
can be called on the original query with the query to be joined with and sets this query in the class BatchJoinOperatorBuilder::Join.
| subQueryRhs |
Referenced by NES::Experimental::BatchJoinOperatorBuilder::Join::where().
| Query & NES::Query::buildStatistic | ( | Windowing::WindowTypePtr | window, |
| Statistic::WindowStatisticDescriptorPtr | statisticDescriptor, | ||
| Statistic::StatisticMetricHash | metricHash, | ||
| Statistic::SendingPolicyPtr | sendingPolicy, | ||
| Statistic::TriggerConditionPtr | triggerCondition | ||
| ) |
Add a synopsis build operator to the query.
| window | |
| statisticDescriptor | |
| metricHash | The hash of the metric, this operator is collecting, e.g., cardinality over field f1 |
| sendingPolicy | Policy so when and how to send the data |
| triggerCondition | Policy when and how to call the callback method |
References backward::details::move(), queryPlan, and window().
Referenced by NES::Statistic::DefaultStatisticQueryGenerator::createStatisticQuery(), and NES::TEST_P().
| CrossJoinOperatorBuilder::CrossJoin NES::Query::crossJoinWith | ( | const Query & | subQueryRhs | ) |
can be called on the original query with the query to be cross joined with and sets this query in the class CrossJoinOperatorBuilder::Join.
| subQueryRhs |
Referenced by NES::TEST_F(), and NES::Runtime::Execution::TEST_P().
| Query & NES::Query::filter | ( | ExpressionNodePtr const & | filterExpression | ) |
: Filter records according to the predicate. An examplary usage would be: filter(Attribute("f1" < 10))
| predicate | as expression node |
References NES_DEBUG, and queryPlan.
Referenced by UnionQueryExecutionTest::__attribute__(), TEST_F(), NES::TEST_F(), NES::TEST_P(), and NES::CEPOperatorBuilder::Times::window().
| Query & NES::Query::flatMapUDF | ( | Catalogs::UDF::UDFDescriptorPtr const & | descriptor | ) |
|
static |
: Creates a query from a particular source. The source is identified by its name. During query processing the underlying source descriptor is retrieved from the source catalog.
| sourceName | name of the source to query. This name has to be registered in the query catalog. |
References NES_DEBUG, Query(), and queryPlan.
Referenced by NES::Statistic::DefaultStatisticQueryGenerator::createStatisticQuery(), NES::RequestProcessor::TEST_F(), NES::TEST_F(), TEST_F(), NES::Runtime::Execution::TEST_P(), and NES::TEST_P().
| QueryPlanPtr NES::Query::getQueryPlan | ( | ) | const |
Gets the query plan from the current query.
References queryPlan.
Referenced by UnionQueryExecutionTest::__attribute__(), NES::QueryParsingService::createQueryFromCodeString(), WindowAggregationFunctionTest::executeQuery(), orWith(), NES::Runtime::Execution::StreamJoinQuerySharedExecutionTest::runMultipleEqualQueriesDeployedDifferentTime(), NES::MultiThreadedTest::runQuery(), NES::JoinMultiThreadedTest::runQueryAndPrintMissingRecords(), NES::Runtime::Execution::StreamJoinQueryExecutionTest::runQueryWithCsvFiles(), NES::Runtime::Execution::StreamIntervalJoinQueryExecutionTest::runQueryWithCsvFiles(), NES::Runtime::Execution::StreamJoinQueryExecutionTest::runQueryWithCsvFilesWithoutStoppingQuery(), NES::Client::RemoteClient::submitQuery(), NES::RequestProcessor::TEST_F(), NES::TEST_F(), TEST_F(), unionWith(), and NES::CEPOperatorBuilder::Seq::window().
| Query & NES::Query::inferModel | ( | std::string | model, |
| std::initializer_list< ExpressionItem > | inputFields, | ||
| std::initializer_list< ExpressionItem > | outputFields | ||
| ) |
References NES_DEBUG, and queryPlan.
Referenced by NES::TEST_F().
| IntervalJoinOperatorBuilder::IntervalJoin NES::Query::intervalJoinWith | ( | const Query & | subQueryRhs | ) |
can be called on the original query with the query to be joined with and sets this query in the class IntervalJoinOperatorBuilder::Join.
| subQueryRhs |
Referenced by NES::Runtime::Execution::StreamIntervalJoinQueryExecutionTest::runSingleJoinQuery(), TEST_F(), NES::TEST_F(), and NES::IntervalJoinOperatorBuilder::JoinLowerBound::upperBound().
| JoinOperatorBuilder::Join NES::Query::joinWith | ( | const Query & | subQueryRhs | ) |
can be called on the original query with the query to be joined with and sets this query in the class Join.
| subQueryRhs |
Referenced by NES::Runtime::Execution::StreamJoinQuerySharedExecutionTest::prepareRunTwoEqualQueriesDeployedDifferentTime(), NES::Runtime::Execution::StreamJoinQueryExecutionTest::runSingleJoinQuery(), NES::RequestProcessor::TEST_F(), NES::TEST_F(), NES::Runtime::Execution::TEST_P(), NES::TEST_P(), NES::JoinOperatorBuilder::JoinWhere::window(), and NES::CrossJoinOperatorBuilder::CrossJoin::window().
| Query & NES::Query::limit | ( | const uint64_t | limit | ) |
| Query & NES::Query::map | ( | FieldAssignmentExpressionNodePtr const & | mapExpression | ) |
: Map records according to a map expression. An examplary usage would be: map(Attribute("f2") = Attribute("f1") * 42 )
| map | expression |
References NES_DEBUG, and queryPlan.
Referenced by NES::CEPOperatorBuilder::And::And(), NES::CrossJoinOperatorBuilder::CrossJoin::CrossJoin(), TEST_F(), NES::TEST_F(), NES::TEST_P(), and NES::CEPOperatorBuilder::Times::Times().
| Query & NES::Query::mapUDF | ( | Catalogs::UDF::UDFDescriptorPtr const & | descriptor | ) |
can be called on the original query with the query to be composed with and sets this query in the class Or.
| subQueryRhs |
References getQueryPlan(), NES_DEBUG, and queryPlan.
|
inline |
this call projects out the attributes in the parameter list
| attribute | list |
Referenced by TEST_F(), NES::TEST_F(), NES::TEST_P(), and TEST_P().
| Query & NES::Query::project | ( | std::vector< ExpressionNodePtr > | expressions | ) |
| CEPOperatorBuilder::Seq NES::Query::seqWith | ( | const Query & | subQueryRhs | ) |
can be called on the original query with the query to be composed with and sets this query in the class Join.
| subQueryRhs |
Referenced by TEST_F(), NES::TEST_F(), and NES::CEPOperatorBuilder::Seq::window().
|
virtual |
Add sink operator for the query. The Sink operator is defined by the sink descriptor, which represents the semantic of this sink.
| sinkDescriptor | |
| workerId | location where sink is to be placed |
References NES_DEBUG, and queryPlan.
Referenced by UnionQueryExecutionTest::__attribute__(), NES::Statistic::DefaultStatisticQueryGenerator::createStatisticQuery(), NES::Runtime::Execution::StreamJoinQuerySharedExecutionTest::prepareRunTwoEqualQueriesDeployedDifferentTime(), NES::Runtime::Execution::StreamIntervalJoinQueryExecutionTest::runSingleJoinQuery(), NES::Runtime::Execution::StreamJoinQueryExecutionTest::runSingleJoinQuery(), NES::RequestProcessor::TEST_F(), TEST_F(), NES::TEST_F(), NES::TEST_P(), TEST_P(), and NES::Runtime::Execution::TEST_P().
| CEPOperatorBuilder::Times NES::Query::times | ( | ) |
can be called on the original query to detect multiple occurrences of specified events in a stream
| CEPOperatorBuilder::Times NES::Query::times | ( | const uint64_t | minOccurrences, |
| const uint64_t | maxOccurrences | ||
| ) |
can be called on the original query to detect an number event occurrences between minOccurrence and maxOccurrence in a stream
| minOccurrences | |
| maxOccurrences |
Referenced by TEST_F(), and NES::TEST_F().
| CEPOperatorBuilder::Times NES::Query::times | ( | const uint64_t | occurrences | ) |
can be called on the original query to detect an exact number event occurrences in a stream
| occurrences |
This looks ugly, but we can't reference to QueryPtr at this line.
| subQuery | is the query to be unioned |
References getQueryPlan(), NES_DEBUG, and queryPlan.
Referenced by UnionQueryExecutionTest::__attribute__(), TEST_F(), and NES::TEST_F().
| WindowOperatorBuilder::WindowedQuery NES::Query::window | ( | Windowing::WindowTypePtr const & | windowType | ) |
Referenced by NES::WindowOperatorBuilder::WindowedQuery::apply(), buildStatistic(), TEST_F(), NES::TEST_F(), TEST_P(), NES::TEST_P(), and NES::CEPOperatorBuilder::Times::window().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Referenced by as(), assignWatermark(), buildStatistic(), filter(), flatMapUDF(), NES::TestQuery::from(), from(), getQueryPlan(), inferModel(), limit(), map(), mapUDF(), orWith(), project(), sink(), and unionWith().