Tabnine Logo
MergeFilterRule
Code IndexAdd Tabnine to your IDE (free)

How to use
MergeFilterRule
in
org.eigenbase.rel.rules

Best Java code snippets using org.eigenbase.rel.rules.MergeFilterRule (Showing top 4 results out of 315)

origin: net.hydromatic/optiq

/**
 * Creates a MergeFilterRule.
 */
private MergeFilterRule()
{
  super(
    some(
      FilterRel.class, any(FilterRel.class)));
}
origin: org.apache.optiq/optiq-core

/**
 * Creates a MergeFilterRule.
 */
private MergeFilterRule() {
 super(
   operand(
     FilterRel.class,
     operand(FilterRel.class, any())));
}
origin: org.apache.optiq/optiq-core

public void onMatch(RelOptRuleCall call) {
 FilterRel topFilter = call.rel(0);
 FilterRel bottomFilter = call.rel(1);
 // use RexPrograms to merge the two FilterRels into a single program
 // so we can convert the two FilterRel conditions to directly
 // reference the bottom FilterRel's child
 RexBuilder rexBuilder = topFilter.getCluster().getRexBuilder();
 RexProgram bottomProgram = createProgram(bottomFilter);
 RexProgram topProgram = createProgram(topFilter);
 RexProgram mergedProgram =
   RexProgramBuilder.mergePrograms(
     topProgram,
     bottomProgram,
     rexBuilder);
 RexNode newCondition =
   mergedProgram.expandLocalRef(
     mergedProgram.getCondition());
 FilterRel newFilterRel =
   new FilterRel(
     topFilter.getCluster(),
     bottomFilter.getChild(),
     newCondition);
 call.transformTo(newFilterRel);
}
origin: net.hydromatic/optiq

public void onMatch(RelOptRuleCall call)
{
  FilterRel topFilter = call.rel(0);
  FilterRel bottomFilter = call.rel(1);
  // use RexPrograms to merge the two FilterRels into a single program
  // so we can convert the two FilterRel conditions to directly
  // reference the bottom FilterRel's child
  RexBuilder rexBuilder = topFilter.getCluster().getRexBuilder();
  RexProgram bottomProgram = createProgram(bottomFilter);
  RexProgram topProgram = createProgram(topFilter);
  RexProgram mergedProgram =
    RexProgramBuilder.mergePrograms(
      topProgram,
      bottomProgram,
      rexBuilder);
  RexNode newCondition =
    mergedProgram.expandLocalRef(
      mergedProgram.getCondition());
  FilterRel newFilterRel =
    new FilterRel(
      topFilter.getCluster(),
      bottomFilter.getChild(),
      newCondition);
  call.transformTo(newFilterRel);
}
org.eigenbase.rel.rulesMergeFilterRule

Javadoc

MergeFilterRule implements the rule for combining two FilterRels

Most used methods

  • any
  • createProgram
    Creates a RexProgram corresponding to a FilterRel
  • operand
  • some

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Kernel (java.awt.image)
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top Sublime Text plugins
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