Skip to content

Commit 2cfb9cb

Browse files
elianddbjycor
andauthored
trunc if in sql/planbuilder/dml.go
Co-authored-by: James Cor <[email protected]>
1 parent 0c9925a commit 2cfb9cb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sql/planbuilder/dml.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,7 @@ func (b *Builder) assignmentExprsToExpressions(inScope *scope, e ast.AssignmentE
293293
// This means that trigger execution will be able to update generated columns
294294

295295
// Check if this is a DEFAULT expression for a generated column
296-
isDefaultExpr := false
297-
if _, ok := updateExpr.Expr.(*ast.Default); ok {
298-
isDefaultExpr = true
299-
}
296+
_, isDefaultExpr := updateExpr.Expr.(*ast.Default)
300297

301298
// Prevent update of generated columns, but allow DEFAULT
302299
if colIdx >= 0 && tableSch[colIdx].Generated != nil && !isDefaultExpr {

0 commit comments

Comments
 (0)