[#4481] Added a comment explaining the rationale
This commit is contained in:
parent
25da0703a8
commit
9cd9867f89
@ -96,6 +96,9 @@ class DateDiff extends AbstractFunction<Integer> {
|
||||
xx [/pro] */
|
||||
case CUBRID:
|
||||
case POSTGRES:
|
||||
|
||||
// [#4481] Parentheses are important in case this expression is
|
||||
// placed in the context of other arithmetic
|
||||
return field("({0} - {1})", getDataType(), date1, date2);
|
||||
|
||||
/* [pro] xx
|
||||
|
||||
@ -106,6 +106,9 @@ class TimestampDiff extends AbstractFunction<DayToSecond> {
|
||||
xxxx xxxxxxx
|
||||
xx [/pro] */
|
||||
case POSTGRES:
|
||||
|
||||
// [#4481] Parentheses are important in case this expression is
|
||||
// placed in the context of other arithmetic
|
||||
return field("({0} - {1})", getDataType(), timestamp1, timestamp2);
|
||||
|
||||
// CUBRID's datetime operations operate on a millisecond level
|
||||
|
||||
Loading…
Reference in New Issue
Block a user