Class ScalarFunction

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    AggregateFunction, SimpleFunction

    public abstract class ScalarFunction
    extends Function
    This class represents functions that return a scalar value.
    • Constructor Summary

      Constructors 
      Constructor Description
      ScalarFunction()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract ColumnType getReturnType​(java.util.List<Expression> args, Schema schema)
      Returns the column type of the resulting column after applying the function.
      • Methods inherited from class edu.caltech.nanodb.functions.Function

        clone
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScalarFunction

        public ScalarFunction()
    • Method Detail

      • getReturnType

        public abstract ColumnType getReturnType​(java.util.List<Expression> args,
                                                 Schema schema)
        Returns the column type of the resulting column after applying the function. This generally depends on the column type of the inputs.
        Parameters:
        args - the arguments to the function call
        schema - the schema of the table
        Returns:
        the column type of the resulting column