/** * Creates a namespace for a set operation (<code>UNION</code>, <code> * INTERSECT</code>, or <code>EXCEPT</code>). Derived class may override * this factory method. * * @param call Call to set operation * @param enclosingNode Enclosing node * @return Set operation namespace */ protected SetopNamespace createSetopNamespace( SqlCall call, SqlNode enclosingNode) { return new SetopNamespace(this, call, enclosingNode); }
@Override public SqlMonotonicity getMonotonicity(String columnName) { SqlMonotonicity monotonicity = null; int index = getRowType().getFieldNames().indexOf(columnName); if (index < 0) { return SqlMonotonicity.NOT_MONOTONIC; } for (SqlNode operand : call.getOperandList()) { final SqlValidatorNamespace namespace = validator.getNamespace(operand); monotonicity = combine(monotonicity, namespace.getMonotonicity( namespace.getRowType().getFieldNames().get(index))); } return monotonicity; }
@Override public SqlMonotonicity getMonotonicity(String columnName) { SqlMonotonicity monotonicity = null; int index = getRowType().getFieldNames().indexOf(columnName); if (index < 0) { return SqlMonotonicity.NOT_MONOTONIC; } for (SqlNode operand : call.getOperandList()) { final SqlValidatorNamespace namespace = validator.getNamespace(operand); monotonicity = combine(monotonicity, namespace.getMonotonicity( namespace.getRowType().getFieldNames().get(index))); } return monotonicity; }
/** * Creates a namespace for a set operation (<code>UNION</code>, <code> * INTERSECT</code>, or <code>EXCEPT</code>). Derived class may override * this factory method. * * @param call Call to set operation * @param enclosingNode Enclosing node * @return Set operation namespace */ protected SetopNamespace createSetopNamespace( SqlCall call, SqlNode enclosingNode) { return new SetopNamespace(this, call, enclosingNode); }
/** * Creates a namespace for a set operation (<code>UNION</code>, <code> * INTERSECT</code>, or <code>EXCEPT</code>). Derived class may override * this factory method. * * @param call Call to set operation * @param enclosingNode Enclosing node * @return Set operation namespace */ protected SetopNamespace createSetopNamespace( SqlCall call, SqlNode enclosingNode) { return new SetopNamespace(this, call, enclosingNode); }