diff --git a/bolt/functions/prestosql/ArrayFunctions.h b/bolt/functions/prestosql/ArrayFunctions.h index 64f3ef536..fb65e28db 100644 --- a/bolt/functions/prestosql/ArrayFunctions.h +++ b/bolt/functions/prestosql/ArrayFunctions.h @@ -949,7 +949,7 @@ struct ArrayRemoveFunctionString { if (item.has_value()) { auto result = element.compare(item.value()); if (result) { - out.push_back(item.value()); + out.add_item().setNoCopy(item.value()); } } else { out.add_null();