Skip to content

Commit 0069627

Browse files
author
James Cor
committed
feedback
1 parent f56cb24 commit 0069627

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sql/expression/function/date.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,8 @@ var _ sql.CollationCoercible = (*UnixTimestamp)(nil)
405405

406406
const MaxUnixTimeMicroSecs = 32536771199999999
407407

408-
// noEval returns true if the expression contains an expression that cannot be evaluated without sql.Context or sql.Row.
408+
// canEval returns if the expression contains an expression that cannot be evaluated without sql.Context or sql.Row.
409409
func canEval(expr sql.Expression) bool {
410-
// Convert Timezone is not evaluable
411410
evaluable := true
412411
transform.InspectExpr(expr, func(e sql.Expression) bool {
413412
switch e.(type) {

sql/types/datetime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func (t datetimeType) Equals(otherType sql.Type) bool {
353353
if dtType, isDtType := otherType.(sql.DatetimeType); isDtType {
354354
return t.baseType == dtType.Type() && t.precision == dtType.Precision()
355355
}
356-
return t.baseType == otherType.Type()
356+
return false
357357
}
358358

359359
// MaxTextResponseByteLength implements the Type interface

0 commit comments

Comments
 (0)