Skip to content

Commit 2e6643f

Browse files
committed
Fix empty string
1 parent 10a2eb2 commit 2e6643f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

azkustodata/kql/builder_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ func TestBuilder(t *testing.T) {
129129
AddColumn("b\na\nz").AddLiteral(" == ").
130130
AddFunction("f_u_n\u1234c").AddLiteral("()"),
131131
`database("f\"\"o").["b\\a\\r"] | where ["b\na\nz"] == ["f_u_n\u1234c"]()`},
132+
{
133+
"Test Empty String",
134+
New(`myTable | where col = `).AddString(""),
135+
`myTable | where col = ""`,
136+
},
132137
}
133138
for _, test := range tests {
134139
t.Run(test.name, func(t *testing.T) {

azkustodata/kql/string_utils.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ func RequiresQuoting(value string) bool {
2626
}
2727

2828
func QuoteString(value string, hidden bool) string {
29-
if value == "" {
30-
return value
31-
}
32-
3329
var literal strings.Builder
3430

3531
if hidden {

0 commit comments

Comments
 (0)