Exemplo n.º 1
0
 /// <summary>
 /// Registers the given delegate as a vector user-defined function with the specified name.
 /// </summary>
 /// <typeparam name="T">Specifies the type of the first argument to the UDF.</typeparam>
 /// <typeparam name="TResult">Specifies the return type of the UDF.</typeparam>
 /// <param name="udf">The <see cref="UdfRegistration"/> object to invoke the register the Vector UDF.</param>
 /// <param name="name">The UDF name.</param>
 /// <param name="f">The UDF function implementation.</param>
 public static void RegisterVector <T, TResult>(
     this UdfRegistration udf, string name, Func <T, TResult> f)
     where T : DataFrameColumn
     where TResult : DataFrameColumn
 {
     RegisterVector <TResult>(udf, name, DataFrameUdfUtils.CreateVectorUdfWrapper(f));
 }
 /// <summary>
 /// Registers the given delegate as a vector user-defined function with the specified name.
 /// </summary>
 /// <typeparam name="T">Specifies the type of the first argument to the UDF.</typeparam>
 /// <typeparam name="TResult">Specifies the return type of the UDF.</typeparam>
 /// <param name="udf">The <see cref="UdfRegistration"/> object to invoke the register the Vector UDF.</param>
 /// <param name="name">The UDF name.</param>
 /// <param name="f">The UDF function implementation.</param>
 public static void RegisterVector <T, TResult>(
     this UdfRegistration udf, string name, Func <T, TResult> f)
     where T : IArrowArray
     where TResult : IArrowArray
 {
     RegisterVector <TResult>(udf, name, UdfUtils.CreateVectorUdfWrapper(f));
 }
 /// <summary>
 /// Registers the given delegate as a vector user-defined function with the specified name.
 /// </summary>
 /// <typeparam name="T1">Specifies the type of the first argument to the UDF.</typeparam>
 /// <typeparam name="T2">Specifies the type of the second argument to the UDF.</typeparam>
 /// <typeparam name="T3">Specifies the type of the third argument to the UDF.</typeparam>
 /// <typeparam name="T4">Specifies the type of the fourth argument to the UDF.</typeparam>
 /// <typeparam name="T5">Specifies the type of the fifth argument to the UDF.</typeparam>
 /// <typeparam name="TResult">Specifies the return type of the UDF.</typeparam>
 /// <param name="udf">The <see cref="UdfRegistration"/> object to invoke the register the Vector UDF.</param>
 /// <param name="name">The UDF name.</param>
 /// <param name="f">The UDF function implementation.</param>
 public static void RegisterVector <T1, T2, T3, T4, T5, TResult>(
     this UdfRegistration udf, string name, Func <T1, T2, T3, T4, T5, TResult> f)
     where T1 : IArrowArray
     where T2 : IArrowArray
     where T3 : IArrowArray
     where T4 : IArrowArray
     where T5 : IArrowArray
     where TResult : IArrowArray
 {
     RegisterVector <TResult>(udf, name, UdfUtils.CreateVectorUdfWrapper(f));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Registers the given delegate as a vector user-defined function with the specified name.
 /// </summary>
 /// <typeparam name="T1">Specifies the type of the first argument to the UDF.</typeparam>
 /// <typeparam name="T2">Specifies the type of the second argument to the UDF.</typeparam>
 /// <typeparam name="T3">Specifies the type of the third argument to the UDF.</typeparam>
 /// <typeparam name="T4">Specifies the type of the fourth argument to the UDF.</typeparam>
 /// <typeparam name="T5">Specifies the type of the fifth argument to the UDF.</typeparam>
 /// <typeparam name="T6">Specifies the type of the sixth argument to the UDF.</typeparam>
 /// <typeparam name="TResult">Specifies the return type of the UDF.</typeparam>
 /// <param name="udf">The <see cref="UdfRegistration"/> object to invoke the register the Vector UDF.</param>
 /// <param name="name">The UDF name.</param>
 /// <param name="f">The UDF function implementation.</param>
 public static void RegisterVector <T1, T2, T3, T4, T5, T6, TResult>(
     this UdfRegistration udf, string name, Func <T1, T2, T3, T4, T5, T6, TResult> f)
     where T1 : DataFrameColumn
     where T2 : DataFrameColumn
     where T3 : DataFrameColumn
     where T4 : DataFrameColumn
     where T5 : DataFrameColumn
     where T6 : DataFrameColumn
     where TResult : DataFrameColumn
 {
     RegisterVector <TResult>(udf, name, DataFrameUdfUtils.CreateVectorUdfWrapper(f));
 }
Exemplo n.º 5
0
 private static void RegisterVector <TResult>(UdfRegistration udf, string name, Delegate func)
 {
     udf.Register <TResult>(name, func, UdfUtils.PythonEvalType.SQL_SCALAR_PANDAS_UDF);
 }