naman1996 opened a new pull request #8614:
URL: https://github.com/apache/arrow/pull/8614


   
   
   
[](https://github.com/apache/arrow/commit/36bf7a43eefd3bc5563fcfa8d04bc35a49c97978)
 
   
   
   In this change a bit of refactoring was done and we changes function 
definitions for cast function which were earlier to  
   
   `UNARY_UNS[AFE_NULL_IF_NULL(castINT, {}, utf8, int32),
   UNARY_UNSAFE_NULL_IF_NULL(castBIGINT, {}, utf8, int64),
   UNARY_UNSAFE_NULL_IF_NULL(castFLOAT4, {}, utf8, float32),
   UNARY_UNSAFE_NULL_IF_NULL(castFLOAT8, {}, utf8, float64)`
    
   were changed to 
   `
         NativeFunction("castINT", {}, DataTypeVector{utf8()}, int32(), 
kResultNullIfNull,
                         "gdv_fn_castINT_utf8", NativeFunction::kNeedsContext),
   
          NativeFunction("castBIGINT", {}, DataTypeVector{utf8()}, int64(), 
kResultNullIfNull,
                         "gdv_fn_castBIGINT_utf8", 
NativeFunction::kNeedsContext),
   
          NativeFunction("castFLOAT4", {}, DataTypeVector{utf8()}, float32(),
                         kResultNullIfNull, "gdv_fn_castFLOAT4_utf8",
                         NativeFunction::kNeedsContext),
   
          NativeFunction("castFLOAT8", {}, DataTypeVector{utf8()}, float64(),
                         kResultNullIfNull, "gdv_fn_castFLOAT8_utf8",
                         NativeFunction::kNeedsContext) `
   
   UNARY_UNSAFE_NULL_IF_NULL will add `NativeFunction::CanReturnErrors`
   to the definitions so the functions won’t be evaluated for inputs whose 
validity is null which was removed when the definitions were refactored.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to