Class HttpPushDownListener

java.lang.Object
org.apache.drill.exec.store.http.HttpPushDownListener
All Implemented Interfaces:
FilterPushDownListener

public class HttpPushDownListener extends Object implements FilterPushDownListener
The HTTP storage plugin accepts filters which are:
  • A single column = value expression, where the column is a filter column from the config, or
  • 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.)
  • A field from the URL. For instance in some APIs you have parameters that are part of the path. For example, https://github.com/orgs/{org}/repos. In this instance, the query must contain a parameter called org.
  • Constructor Details

    • HttpPushDownListener

      public HttpPushDownListener()
  • 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