congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Expressions.toExpressionLeafFilter
Code IndexAdd Tabnine to your IDE (free)

How to use
toExpressionLeafFilter
method
in
org.apache.druid.sql.calcite.expression.Expressions

Best Java code snippets using org.apache.druid.sql.calcite.expression.Expressions.toExpressionLeafFilter (Showing top 2 results out of 315)

origin: apache/incubator-druid

/**
 * Translates "condition" to a Druid filter, assuming it does not contain any boolean expressions. Returns null
 * if we cannot translate the condition.
 *
 * @param plannerContext planner context
 * @param rowSignature   row signature of the dataSource to be filtered
 * @param rexNode        Calcite row expression
 */
@Nullable
private static DimFilter toLeafFilter(
  final PlannerContext plannerContext,
  final RowSignature rowSignature,
  final RexNode rexNode
)
{
 if (rexNode.isAlwaysTrue()) {
  return Filtration.matchEverything();
 } else if (rexNode.isAlwaysFalse()) {
  return Filtration.matchNothing();
 }
 final DimFilter simpleFilter = toSimpleLeafFilter(plannerContext, rowSignature, rexNode);
 return simpleFilter != null ? simpleFilter : toExpressionLeafFilter(plannerContext, rowSignature, rexNode);
}
origin: org.apache.druid/druid-sql

/**
 * Translates "condition" to a Druid filter, assuming it does not contain any boolean expressions. Returns null
 * if we cannot translate the condition.
 *
 * @param plannerContext planner context
 * @param rowSignature   row signature of the dataSource to be filtered
 * @param rexNode        Calcite row expression
 */
@Nullable
private static DimFilter toLeafFilter(
  final PlannerContext plannerContext,
  final RowSignature rowSignature,
  final RexNode rexNode
)
{
 if (rexNode.isAlwaysTrue()) {
  return Filtration.matchEverything();
 } else if (rexNode.isAlwaysFalse()) {
  return Filtration.matchNothing();
 }
 final DimFilter simpleFilter = toSimpleLeafFilter(plannerContext, rowSignature, rexNode);
 return simpleFilter != null ? simpleFilter : toExpressionLeafFilter(plannerContext, rowSignature, rexNode);
}
org.apache.druid.sql.calcite.expressionExpressionstoExpressionLeafFilter

Javadoc

Translates to an "expression" type leaf filter. Used as a fallback if we can't use a simple leaf filter.

Popular methods of Expressions

  • toDruidExpression
    Translate a Calcite RexNode to a Druid expressions.
  • fromFieldAccess
    Translate a field access, possibly through a projection, to an underlying Druid dataSource.
  • asTimestampFloorExpr
  • buildTimeFloorFilter
    Build a filter for an expression like FLOOR(column TO granularity) [operator] rhsMillis
  • exprTypeForValueType
  • getBoundTimeDimFilter
  • toDruidExpressions
    Translate a list of Calcite RexNode to Druid expressions.
  • toFilter
    Translates "condition" to a Druid filter, or returns null if we cannot translate the condition.
  • toLeafFilter
    Translates "condition" to a Druid filter, assuming it does not contain any boolean expressions. Retu
  • toQueryGranularity
    Converts an expression to a Granularity, if possible. This is possible if, and only if, the expressi
  • toSimpleLeafFilter
    Translates to a simple leaf filter, meaning one that hits just a single column and is not an express
  • toSimpleLeafFilter

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • Menu (java.awt)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JComboBox (javax.swing)
  • JList (javax.swing)
  • JOptionPane (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now