Skip to content

Commit

Permalink
updated dsunit udf
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed Sep 20, 2024
1 parent 2c8ec55 commit 5471559
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.77.2
0.77.3
6 changes: 5 additions & 1 deletion service/testing/dsunit/udf.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,14 @@ func expandSequenceExpr(value, caseTag string, sequencerMapping data.Map, sequen
}
value = strings.ReplaceAll(value, expr, toolbox.AsString(seqValue))
if strings.Contains(value, "$") {
if strings.HasPrefix(value, "$AsInt") {
isInt := strings.HasPrefix(value, "$AsInt")
if isInt {
value = value[7 : len(value)-1]
}
value = state.ExpandAsText(value)
if isInt {
return toolbox.AsInt(value), true
}
}
return value, true
}
Expand Down

0 comments on commit 5471559

Please sign in to comment.