| 41 | BOLT_DEFINE_FUNCTION_TYPES(TExec); |
| 42 | |
| 43 | FOLLY_ALWAYS_INLINE bool callNullable( |
| 44 | out_type<Array<Generic<T1>>>& out, |
| 45 | const arg_type<Array<Generic<T1>>>* array, |
| 46 | const arg_type<Generic<T1>>* element) { |
| 47 | if (array == nullptr) { |
| 48 | return false; |
| 49 | } |
| 50 | out.reserve(array->size() + 1); |
| 51 | out.add_items(*array); |
| 52 | element ? out.push_back(*element) : out.add_null(); |
| 53 | return true; |
| 54 | } |
| 55 | }; |
| 56 | |
| 57 | } // namespace bytedance::bolt::functions::sparksql |