From 165a838c196a16bf98f7af8021e680dbbbff87d5 Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Fri, 21 Jun 2024 14:13:40 +0800 Subject: [PATCH] Fix comment --- velox/core/SimpleFunctionMetadata.h | 12 ++++++------ velox/expression/tests/SimpleFunctionTest.cpp | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/velox/core/SimpleFunctionMetadata.h b/velox/core/SimpleFunctionMetadata.h index eb35ae507195..39686f7a3f14 100644 --- a/velox/core/SimpleFunctionMetadata.h +++ b/velox/core/SimpleFunctionMetadata.h @@ -709,13 +709,13 @@ class UDFHolder { static_assert( !(udf_has_call_return_bool && udf_has_call_return_void), - "Provided call() methods need to return either void OR bool OR status."); + "Provided call() methods need to return either void OR bool OR Status."); static_assert( !(udf_has_call_return_bool && udf_has_call_return_status), - "Provided call() methods need to return either void OR bool OR status."); + "Provided call() methods need to return either void OR bool OR Status."); static_assert( !(udf_has_call_return_void && udf_has_call_return_status), - "Provided call() methods need to return either void OR bool OR status."); + "Provided call() methods need to return either void OR bool OR Status."); // callNullable(): static constexpr bool udf_has_callNullable_return_bool = util::has_method< @@ -741,13 +741,13 @@ class UDFHolder { udf_has_callNullable_return_status; static_assert( !(udf_has_callNullable_return_bool && udf_has_callNullable_return_void), - "Provided callNullable() methods need to return either void OR bool OR status."); + "Provided callNullable() methods need to return either void OR bool OR Status."); static_assert( !(udf_has_callNullable_return_bool && udf_has_callNullable_return_status), - "Provided callNullable() methods need to return either void OR bool OR status."); + "Provided callNullable() methods need to return either void OR bool OR Status."); static_assert( !(udf_has_callNullable_return_void && udf_has_callNullable_return_status), - "Provided callNullable() methods need to return either void OR bool OR status."); + "Provided callNullable() methods need to return either void OR bool OR Status."); // callNullFree(): static constexpr bool udf_has_callNullFree_return_bool = util::has_method< diff --git a/velox/expression/tests/SimpleFunctionTest.cpp b/velox/expression/tests/SimpleFunctionTest.cpp index 47aff7266201..471259d70a10 100644 --- a/velox/expression/tests/SimpleFunctionTest.cpp +++ b/velox/expression/tests/SimpleFunctionTest.cpp @@ -1548,6 +1548,7 @@ TEST_F(SimpleFunctionTest, noThrow) { (evaluateOnce("try(no_throw(c0))", 6)), "Input must not be 6"); + // Error reported via Status by callNullable. VELOX_ASSERT_THROW( (evaluateOnce("no_throw(c0)", std::nullopt)), "Input cannot be NULL");