Class GoogleSheetsPushDownListener

java.lang.Object
org.apache.drill.exec.store.googlesheets.GoogleSheetsPushDownListener
All Implemented Interfaces:
FilterPushDownListener

public class GoogleSheetsPushDownListener extends Object implements FilterPushDownListener
The GoogleSheets 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.)
Note, at the moment, no filters are pushed down. Once we figure out the Google SDK for this, we can easily uncomment out the lines below and the filters will be pushed down.
  • Constructor Details

    • GoogleSheetsPushDownListener

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