fn get_scalar_pattern_flag<'a, OffsetSize: OffsetSizeTrait>( regex_array: &'a dyn Array, flag_array: Option<&'a dyn Array>, ) -> (Option<&'a str>, Option<&'a str>)