class_docstr: Wrapper for user-defined function registration. This instance can be accessed by
  :attr:`spark.udf` or :attr:`sqlContext.udf`.
  
  .. versionadded:: 1.3.1
class_docstr_tok: ["Wrapper","for","user-defined","function","registration",".","This","instance","can","be","accessed","by",":","attr",":","`","spark.udf","`","or",":","attr",":","`","sqlContext.udf","`",".","..","versionadded",":",":","1.3.1"]
docstr: Register a Java user-defined aggregate function as a SQL function.
  
  .. versionadded:: 2.3.0
  
  .. versionchanged:: 3.4.0
      Supports Spark Connect.
  
  name : str
      name of the user-defined aggregate function
  javaClassName : str
      fully qualified name of java class
  
  Examples
  --------
  >>> spark.udf.registerJavaUDAF("javaUDAF", "test.org.apache.spark.sql.MyDoubleAvg")
  ... # doctest: +SKIP
  >>> df = spark.createDataFrame([(1, "a"),(2, "b"), (3, "a")],["id", "name"])
  >>> df.createOrReplaceTempView("df")
  >>> q = "SELECT name, javaUDAF(id) as avg from df group by name order by name desc"
  >>> spark.sql(q).collect()  # doctest: +SKIP
  [Row(name='b', avg=102.0), Row(name='a', avg=102.0)]
docstr_tok: ["Register","a","Java","user-defined","aggregate","function","as","a","SQL","function",".","..","versionadded",":",":","2.3.0","..","versionchanged",":",":","3.4.0","Supports","Spark","Connect",".","name",":","str","name","of","the","user-defined","aggregate","function","javaClassName",":","str","fully","qualified","name","of","java","class","Examples","--","--","--","--",">",">",">","spark.udf.registerJavaUDAF","(","``","javaUDAF","''",",","``","test.org.apache.spark.sql.MyDoubleAvg","''",")","...","#","doctest",":","+SKIP",">",">",">","df","=","spark.createDataFrame","(","[","(","1",",","``","a","''",")",",","(","2",",","``","b","''",")",",","(","3",",","``","a","''",")","]",",","[","``","id","''",",","``","name","''","]",")",">",">",">","df.createOrReplaceTempView","(","``","df","''",")",">",">",">","q","=","``","SELECT","name",",","javaUDAF","(","id",")","as","avg","from","df","group","by","name","order","by","name","desc","''",">",">",">","spark.sql","(","q",")",".collect","(",")","#","doctest",":","+SKIP","[","Row","(","name=","'","b","'",",","avg=102.0",")",",","Row","(","name=","'","a","'",",","avg=102.0",")","]"]
code: def registerJavaUDAF(self, name: str, javaClassName: str) -> None:
      """Register a Java user-defined aggregate function as a SQL function.
  
      .. versionadded:: 2.3.0
  
      .. versionchanged:: 3.4.0
          Supports Spark Connect.
  
      name : str
          name of the user-defined aggregate function
      javaClassName : str
          fully qualified name of java class
  
      Examples
      --------
      >>> spark.udf.registerJavaUDAF("javaUDAF", "test.org.apache.spark.sql.MyDoubleAvg")
      ... # doctest: +SKIP
      >>> df = spark.createDataFrame([(1, "a"),(2, "b"), (3, "a")],["id", "name"])
      >>> df.createOrReplaceTempView("df")
      >>> q = "SELECT name, javaUDAF(id) as avg from df group by name order by name desc"
      >>> spark.sql(q).collect()  # doctest: +SKIP
      [Row(name='b', avg=102.0), Row(name='a', avg=102.0)]
      """
  
      self.sparkSession._jsparkSession.udf().registerJavaUDAF(
          name, javaClassName
      )
  
imports: from inspect import getfullargspec
  import functools
  import inspect
  import sys
  import warnings
  from typing import Callable, Any, TYPE_CHECKING, Optional, cast, Union
  from py4j.java_gateway import JavaObject
  from pyspark import SparkContext
  from pyspark.rdd import _prepare_for_python_RDD, PythonEvalType
  from pyspark.sql.column import Column, _to_java_expr, _to_seq
  from pyspark.sql.types import DataType, StringType, StructType, _parse_datatype_string
  from pyspark.sql.utils import get_active_spark_context
  from pyspark.sql.pandas.types import to_arrow_type
  from pyspark.sql.pandas.utils import require_minimum_pandas_version, require_minimum_pyarrow_version
  from pyspark.errors import PySparkTypeError, PySparkNotImplementedError, PySparkRuntimeError
label_desc: Use image node_id 4 for calling the UDFRegistration obj's underlying member method code with example usage: obj.registerJavaUDAF(name, javaClassName) without return types