public static class FunctionRegistry.ExistsFactory extends Object implements FunctionRegistry.Factory
FunctionNode
will be a simple test of an anonymous variable.
EXISTS tests the variable for true
. Not exists tests the
variable for false
. The name of that anonymous variable is
the sole ValueExpressionNode
passed into this factory.
The "guts" of the EXISTS logic is translated by an IASTOptimizer
into an ASK subquery (an instance of SubqueryRoot
). This will be
executed as a special BOp that bind the success or failure of that ASK
subquery on the anonymous variable. The "ASK" subquery does not fail, it
just binds the truth state of the ASK subquery on the anonymous variable.
The IValueExpression
returned by this factory just tests the
truth state of that anonymous variable.
Constructor and Description |
---|
FunctionRegistry.ExistsFactory(boolean exists) |
Modifier and Type | Method and Description |
---|---|
IValueExpression<? extends IV> |
create(BOpContextBase context,
GlobalAnnotations globals,
Map<String,Object> scalarValues,
ValueExpressionNode... args)
Create an
IValueExpression instance. |
public FunctionRegistry.ExistsFactory(boolean exists)
public IValueExpression<? extends IV> create(BOpContextBase context, GlobalAnnotations globals, Map<String,Object> scalarValues, ValueExpressionNode... args)
FunctionRegistry.Factory
IValueExpression
instance.create
in interface FunctionRegistry.Factory
context
- The BOpContextBase
required to evaluate
IValueExpression
s. This is used if we need to
statically evaluate an IValueExpression
during
query optimization. During query execution the
ContextBindingSet
will convey this information.globals
- The global annotations, including the lexicon namespace.scalarValues
- The scalar arguments (used by some IAggregate
s).args
- The function arguments.IValueExpression
.create() was refactored to pass in the
{@link BOpContextBase} to allow correct resolution of the
{@link LexiconRelation} and {@link ILexiconConfiguration} in
order to properly evaluate {@link IValueExpression}s during
query optimization.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.