Class DropFunctionHandler


public class DropFunctionHandler extends DefaultSqlHandler
  • Constructor Details

  • Method Details

    • getPlan

      public PhysicalPlan getPlan(org.apache.calcite.sql.SqlNode sqlNode) throws ForemanSetupException, IOException
      Unregisters UDFs dynamically. Process consists of several steps:
      1. Registering jar in jar registry to ensure that several jars with the same name is not being unregistered.
      2. Starts remote unregistration process, gets list of all jars and excludes jar to be deleted.
      3. Signals drill bits to start local unregistration process.
      4. Removes source and binary jars from registry area.
      UDFs unregistration is allowed only if dynamic UDFs support is enabled. Only jars registered dynamically can be unregistered, built-in functions loaded at start up are not allowed to be unregistered. Limitation: before jar unregistration make sure no one is using functions from this jar. There is no guarantee that running queries will finish successfully or give correct result.
      Overrides:
      getPlan in class DefaultSqlHandler
      Returns:
      - Single row indicating list of unregistered UDFs, raise exception otherwise
      Throws:
      ForemanSetupException
      IOException