[Bug](delete) Use date as common type for date comparison (#25262)
This commit is contained in:
@ -404,6 +404,8 @@ public class BinaryPredicate extends Predicate implements Writable {
|
||||
} else if (getChild(1).getType().isDate()
|
||||
&& (getChild(0).getType().isStringType() && getChild(0) instanceof StringLiteral)) {
|
||||
return ((StringLiteral) getChild(0)).canConvertToDateType(Type.DATE) ? Type.DATE : Type.DATETIME;
|
||||
} else if (getChild(1).getType().isDate() && getChild(0).getType().isDate()) {
|
||||
return Type.DATE;
|
||||
} else {
|
||||
return Type.DATETIME;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user