Class ReduceExpressionsRule.CalcReduceExpressionsRule

    • Constructor Detail

      • CalcReduceExpressionsRule

        @Deprecated
        public CalcReduceExpressionsRule​(java.lang.Class<? extends Calc> calcClass,
                                         RelBuilderFactory relBuilderFactory)
        Deprecated.
      • CalcReduceExpressionsRule

        public CalcReduceExpressionsRule​(java.lang.Class<? extends Calc> calcClass,
                                         boolean matchNullability,
                                         RelBuilderFactory relBuilderFactory)
    • Method Detail

      • createEmptyRelOrEquivalent

        protected RelNode createEmptyRelOrEquivalent​(RelOptRuleCall call,
                                                     Calc input)
        For static schema systems, a filter that is always false or null can be replaced by a values operator that produces no rows, as the schema information can just be taken from the input Rel. In dynamic schema environments, the filter might have an unknown input type, in these cases they must define a system specific alternative to a Values operator, such as inserting a limit 0 instead of a filter on top of the original input.

        The default implementation of this method is to call RelBuilder.empty(), which for the static schema will be optimized to an empty Values.

        Parameters:
        input - rel to replace, assumes caller has already determined equivalence to Values operation for 0 records or a false filter.
        Returns:
        equivalent but less expensive replacement rel