map_elements function without return_dtype in ticker_to_df
Thanks for this amazing code and its documentation.
A question, while testing the realtime_poller example, the dataframe is created by ticker_to_py.
the functions
add_request_duration_column
add_response_datetime_column
use the method .map_elements. Since the argument return_dtype is not specified, it returns a warning:
MapWithoutReturnDtypeWarning: Callingmap_elementswithout specifyingreturn_dtypecan lead to unpredictable results. Specifyreturn_dtypeto silence this warning.
When adding the dtype the warning goes away, though it leaves me asking what other consequences might happen. It seems that the variable that is going to be written is well defined and confined by the scope of the function.
What would be against specifying the return_dtype?
Hi @lucaga,
I guess the right type for these columns is pl.Datetime.
For the impact let's see.
PR are welcome !
Thanks for this feedback
PR is done.