// If we're binding the first parameter and the second parameter
// is a date
// we know that the first parameter must be a date type too.
if (i == 0 && (type = children.get(1).getDataType()) != null
&& type.isCoercibleTo(PDataType.DATE)) {
return new PDatum() {
@Override
public boolean isNullable() {
return expression.isNullable();
}
@Override
public PDataType getDataType() {
return type;
}
@Override
public Integer getByteSize() {
return type.getByteSize();
}
@Override
public Integer getMaxLength() {
return expression.getMaxLength();
}
@Override
public Integer getScale() {
return expression.getScale();
}
@Override
public ColumnModifier getColumnModifier() {
return expression.getColumnModifier();
}
};
} else if (expression.getDataType() != null
&& expression.getDataType().isCoercibleTo(
PDataType.DATE)) {
return new PDatum() { // Same as with addition
@Override
public boolean isNullable() {
return expression.isNullable();
}
@Override