Converts the input query into conjunctive normal form.
Converts the input query into a list of sub-queries that should be ANDd together.
Converts the input query into disjunctive normal form.
Converts the input query into a list of sub-queries that should be ORd together.
Return the set of keys explicitly referenced in the query.
Return the set of keys explicitly referenced in the query. This can be useful for assisting with automatic legends.
Split :in queries into a list of queries using :eq.
Split :in queries into a list of queries using :eq. The query should be normalized ahead
of time so it is a string of conjunctions. See dnfList
for more information.
In order to avoid a massive combinatorial explosion clauses that have more than limit
expressions will not be expanded. The default limit is 5. It is somewhat arbitrary, but
seems to work well in practice for the current query data sets at Netflix.
Simplify a query expression that contains True and False constants.
Simplify a query expression that contains True and False constants.
Query expression to simplify.
If true, then the simplification is for the purposes of ignoring certain
query terms. This comes up in some automatic rewriting use-cases where
we need to have a restriction clause based on a subset of the keys and
ignore the rest. Consider the following example:
Lets suppose I want to simplify this to a base query for the common tags
that could be reused with other metrics. One way would be to rewrite all
key query clauses that are not using common tags (prefixed with nf.) to
nf.app,www,:eq,name,http.requests,:eq,:and,status,200,:eq,:not,:and,:sum
Query.True
and simplify. However the not clause causes a problem:
The ignore mode will cause
rewrite - nf.app,www,:eq,:true,:and,:true,:not,:and
simplification 1 - nf.app,www.:eq,:false,:and
simplification 2 - :false
:true,:not
to map to :true
so the term will
get ignored rather than reduce the entire expression to :false
. Default
value is false.
The simplified query expression.
Extract a set of tags for the query based on the :eq
clauses.
(Since version ) see corresponding Javadoc for more information.