Class SplunkPushDownListener

java.lang.Object
org.apache.drill.exec.store.splunk.SplunkPushDownListener
All Implemented Interfaces:
FilterPushDownListener

public class SplunkPushDownListener extends Object implements FilterPushDownListener
The Splunk storage plugin accepts filters which are:
  • A single column = value expression
  • An AND'ed set of such expressions,
  • If the value is one with an unambiguous conversion to a string. (That is, not dates, binary, maps, etc.)
  • Constructor Details

    • SplunkPushDownListener

      public SplunkPushDownListener()
  • Method Details

    • rulesFor

      public static Set<StoragePluginOptimizerRule> rulesFor(OptimizerRulesContext optimizerRulesContext)
    • prefix

      public String prefix()
      Specified by:
      prefix in interface FilterPushDownListener
      Returns:
      a prefix to display in filter rules
    • isTargetScan

      public boolean isTargetScan(GroupScan groupScan)
      Description copied from interface: FilterPushDownListener
      Broad check to see if the scan is of the correct type for this listener. Generally implemented as:
       public boolean isTargetScan(ScanPrel scan) {
         return scan.getGroupScan() instanceof MyGroupScan;
       }
       
      Specified by:
      isTargetScan in interface FilterPushDownListener
      Parameters:
      groupScan - the scan node
      Returns:
      true if the given group scan is one this listener can handle, false otherwise
    • builderFor

      Description copied from interface: FilterPushDownListener
      Check if the filter rule should be applied to the target group scan, and if so, return the builder to use.

      Calcite will run this rule multiple times during planning, but the transform only needs to occur once. Allows the group scan to mark in its own way whether the rule has been applied.

      Specified by:
      builderFor in interface FilterPushDownListener
      Parameters:
      groupScan - the scan node
      Returns:
      builder instance if the push-down should be applied, null otherwise