diff --git a/velox/functions/sparksql/tests/StringTest.cpp b/velox/functions/sparksql/tests/StringTest.cpp index aea4ac1b2e7e..60bf3516bf06 100644 --- a/velox/functions/sparksql/tests/StringTest.cpp +++ b/velox/functions/sparksql/tests/StringTest.cpp @@ -294,8 +294,8 @@ TEST_F(StringTest, lengthVarbinary) { } TEST_F(StringTest, lpad) { - std::string invalidString = "Ψ\xFF\xFFΣΓΔA"; - std::string invalidPadString = "\xFFΨ\xFF"; + const std::string invalidString = "Ψ\xFF\xFFΣΓΔA"; + const std::string invalidPadString = "\xFFΨ\xFF"; const auto lpad = [&](const std::optional& string, const std::optional& size) {