Class InvalidRelException

  • All Implemented Interfaces:
    java.io.Serializable

    public class InvalidRelException
    extends java.lang.Exception
    Exception that indicates that a relational expression would be invalid with given parameters.

    This exception is thrown by the constructor of a subclass of RelNode when given parameters it cannot accept. For example, EnumerableJoinRel can only implement equi-joins, so its constructor throws InvalidRelException when given the condition input0.x - input1.y = 2.

    Because the exception is checked (i.e. extends Exception but not RuntimeException), constructors that throw this exception will declare this exception in their throws clause, and rules that create those relational expressions will need to handle it. Usually a rule will not take the exception personally, and will fail to match. The burden of checking is removed from the rule, which means less code for the author of the rule to maintain.

    The caller that receives an InvalidRelException (typically a rule attempting to create a relational expression) should log it at the DEBUG level.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      InvalidRelException​(java.lang.String message)
      Creates an InvalidRelException.
      InvalidRelException​(java.lang.String message, java.lang.Throwable cause)
      Creates an InvalidRelException with a cause.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

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

      • InvalidRelException

        public InvalidRelException​(java.lang.String message)
        Creates an InvalidRelException.
      • InvalidRelException

        public InvalidRelException​(java.lang.String message,
                                   java.lang.Throwable cause)
        Creates an InvalidRelException with a cause.